Page-layout authoring state and mutations, registered through definePageLayout.
A page layout controls the tab structure, section groupings, header fields, and visibility conditions on a custom object's record detail page. You would normally define one layout per custom object using apiName: 'default'.
> **Caution:** all keys inside tabEdits and headerEdits must be camelCase. > Snake_case keys are silently dropped on the wire and produce an empty layout.
Type definition
export declare class CustomObjectPageLayout {
constructor(customObject: ObjectReference, props: CustomObjectPageLayoutProps);
getLayoutId(): string;
getApiName(): string;
getCustomObjectApiName(): string;
addField(field: CustomObjectFieldInput, options: AddPageLayoutFieldOptions): this;
addFields(fields: CustomObjectFieldInput[], options: AddPageLayoutFieldsOptions): this;
removeField(field: Field | string, options?: RemovePageLayoutFieldOptions): this;
removeFields(fields: Array<Field | string>, options?: RemovePageLayoutFieldOptions): this;
addSection(section: PageLayoutSection, options: AddPageLayoutSectionOptions): this;
removeSection(section: CustomObjectFieldSection, options?: RemovePageLayoutSectionOptions): this;
removeSection(sectionKey: string, options?: RemovePageLayoutSectionOptions): this;
removeSection(sectionKey: string, options: RemoveSystemPageLayoutSectionOptions): this;
addTab(tab: PageLayoutTab, options?: AddPageLayoutTabOptions): this;
removeTab(tabKey: string, options?: RemovePageLayoutTabOptions): this;
addHeaderField(field: Field | NewHeaderField, options?: AddHeaderFieldOptions): this;
removeHeaderField(fieldOrKey: Field | string, options?: RemoveHeaderFieldOptions): this;
setTitleField(field: Field): this;
setTitleField(fieldApiName: FieldRqlName): this;
removeTitleField(): this;
setDescriptionField(field: Field): this;
setDescriptionField(fieldApiName: FieldRqlName): this;
removeDescriptionField(): this;
toDict(): Config;
}
Related types
- ObjectReference
- CustomObjectPageLayoutProps
- CustomObjectFieldInput
- AddPageLayoutFieldOptions
- AddPageLayoutFieldsOptions
- Field
- RemovePageLayoutFieldOptions
- PageLayoutSection
- AddPageLayoutSectionOptions
- CustomObjectFieldSection
- RemovePageLayoutSectionOptions
- RemoveSystemPageLayoutSectionOptions
- PageLayoutTab
- AddPageLayoutTabOptions
- RemovePageLayoutTabOptions
- NewHeaderField
- AddHeaderFieldOptions
- RemoveHeaderFieldOptions
- FieldRqlName