For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
Article

defineField

API reference for defineField: parameters, properties, and return types.

Use with AI:Rippling AI ChatGPT Claude Cursor

Defines a field on a custom object.

import { defineField } from '@rippling/rippling-sdk';

Properties​

PropertyRequiredTypeDescription
apiNameRequiredstring | CustomObjectStandardFieldIdentifier—
descriptionRequired in some variantsstring—
displayNameRequired in some variantsstring—
sectionRequired in some variantsnull | "general" | ObjectScoped<NoInfer<TObject>, CustomObjectFieldSection> | Extract<keyof NoInfer<TObject>["sections"], string> | SectionReference<NoInfer<TObject>>—
standardRequired in some variantsboolean—
allowOtherOptionalboolean—
currencyOptionalstring—
databaseModelOptionalstring—
dataTypeOptionalData type options—
decimalPlacesOptionalnumber—
derivedAggregatedFieldOptionalDerived aggregated field options—
derivedFieldFormulaOptionalnull | string—
detailedOptionsOptional{ [x: string]: JsonValue; }[]—
edgeTypeOptional"LOOKUP" | "PARENT_CHILD"—
enableParentOwnerInheritanceOptionalboolean—
fieldTypeOptionalView type—
formulaAttrMetasOptionalnull | { [x: string]: unknown; }—
indexedOptionalnull | boolean—
lookupFilterRqlConditionOptionalstring—
lookupFilterRqlMetaOptional{ [x: string]: JsonValue; }—
maxLengthOptionalnumber—
optionsOptionalstring[]—
parentChildTypeOptional"PRIMARY" | "SECONDARY"—
referenceStorageTypeOptionalstring—
relatedDataLabelOptionalstring—
requiredOptionalnull | boolean—
rqlFormulaOptionalnull | string—
summaryOptionalOmit<SummarySpec, "filters" | "currencyCode"> & { filters?: NonNullable<FieldProps["summarySpec"]>["filters"]; currencyCode?: string | null; }—
summarySpecOptionalSummarySpec

Internal — set by SummaryField; drives the derived_aggregated_field wire field.

supportedTypesOptionalstring[]—
targetOptionalstring | AnyCustomObjectDefinition—
targetModelRqlNameOptionalstring—
uniqueOptionalnull | boolean—

Requirements marked “in some variants” depend on the selected union member.

Complete options type

Parameters​

ParameterRequiredTypeDescription
objectRequiredTObject—
TypeScript signature
defineField<TObject extends ObjectReference>(object: TObject, props: DefineFieldProps<TObject>): ObjectScoped<TObject, Field>;

Returns​

ObjectScoped<TObject, Field>

Availability​

CapabilitySupport
Pull into a projectSupported
Runtime operationsNot available for this helper