Defines a custom field on a native or custom object.
import { defineCustomField } from '@rippling/rippling-sdk';
Properties
| Property | Required | Type | Description |
|---|---|---|---|
apiName | Required | `${string}__cfv2` | — |
dataType | Required | CustomFieldDataType | — |
modelName | Required | string | — |
modelRqlName | Required | string | — |
name | Required | string | — |
section | Required | DefinedCustomFieldSection<NoInfer<TModel>> | — |
fieldWriteAccess | Required in some variants | "NO_ACCESS" | null | "ADMIN_ACCESS" | "ADMIN_AND_EMPLOYEE_ACCESS" | "EMPLOYEE_ACCESS" | — |
rqlDefinitionFormula | Required in some variants | string | null | — |
applicableGroup | Optional | null | GroupConfig | Record<string, unknown> & { type: typeof COMPONENT_TYPE; name: string; } | — |
applicableGroupId | Optional | null | string | — |
collectDuring | Optional | null | "ONBOARDING" | "NONE" | "HIRING" | "TERMINATING" | — |
defaultValue | Optional | null | { value: string; rqlDefinitionFormula?: never; } | { value?: never; rqlDefinitionFormula: string; } | — |
description | Optional | null | string | — |
displayOrder | Optional | null | number | — |
fieldPermissionClassification | Optional | null | "BASIC_PERSONAL_INFO" | "PERSONAL_INFO" | "SENSITIVE_PERSONAL_INFO" | "BASIC_EMPLOYMENT_INFO" | "EMPLOYMENT_INFO" | "SENSITIVE_EMPLOYMENT_INFO" | — |
fieldReadAccess | Optional | null | "ALL_ACCESS" | "ADMIN_ACCESS" | "ADMIN_AND_EMPLOYEE_ACCESS" | — |
required | Optional | null | boolean | — |
tip | Optional | null | string | — |
Requirements marked “in some variants” depend on the selected union member.
TypeScript signature
defineCustomField<const TModel extends string>(props: DefineCustomFieldProps<TModel>): CustomField<TModel>;
Returns
CustomField<TModel>
Availability
| Capability | Support |
|---|---|
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |