Defines a custom object with typed field references, input parsers, and record operations. Pass the definition to defineManifest directly or through a component that references it. Add a list view with defineListView when deploying a new object through Metadata.
import { defineCustomObject } from '@rippling/rippling-sdk';
Properties
| Property | Required | Type | Description |
|---|---|---|---|
apiName | Required | `${string}__c` | Stable object API name, including the required |
description | Required | string | Human-readable description of what this object represents. |
name | Required | string | Singular display name shown in the Rippling UI, such as |
category | Optional | CategoryInput<C> | Category definition or full category API name ending in |
defaultFieldSectionApiName | Optional | null | string | Full API name of the default field section, preserved when authoring fields separately. |
defaultFieldSectionName | Optional | null | string | Display name of the default field section, preserved when authoring fields separately. |
enableHistory | Optional | boolean | Optional desired history-tracking state observed during metadata reconciliation. |
fields | Optional | FieldDefinitions | Custom-field definitions keyed by full API names ending in |
friendlyName | Optional | null | string | SQL table name used for this object in the data catalog. |
icon | Optional | { readonly emoji?: string | null; readonly ripplingIcon?: string | null; readonly s3Bucket?: string; readonly s3Key?: string; } | Emoji, built-in Rippling icon, or S3 image displayed beside the object's name. |
nameField | Optional | NameFieldDefinition | Name-field definition; omitted definitions use a text name field. |
nameFieldDetails | Optional | null | { is_autonumber_field: boolean; autonumber_format: string; starting_number?: number | undefined; } | Auto-number settings for the name field, including format and starting number. |
ownerRole | Optional | string | Optional owning role id applied during REST provisioning / reconciliation. |
pluralLabel | Optional | null | string | Plural display label used in the Rippling UI. |
pluralName | Optional | string | Plural display label; takes precedence over |
sections | Optional | SectionDefinitions | Field sections keyed by API names ending in |
transformationApiName | Optional | null | string | API name of the transformation whose output is this object. |
TypeScript signature
defineCustomObject<const A extends `${string}__c`, const F extends FieldDefinitions = {}, C extends string = `${Unsuffixed<A>}_category`, S extends SectionDefinitions = {}, N extends NameFieldDefinition = { kind: "text"; }>(props: DefineCustomObjectProps<A, F, C, S, N>): DefinedCustomObject<CustomObjectDefinition<LogicalCustomObjectName<Unsuffixed<A>>, LogicalCategoryName<C>, S, F, N>>;
Returns
The object definition with typed fields, inputs, records, and schema helpers.
DefinedCustomObject
Exact return type
Availability
| Capability | Support |
|---|---|
| Pull into a project | Supported |
| Runtime operations | Available with an authenticated SDK client |