The recordLayouts field of LayoutConnection type returns page layout metadata for objects. The response includes sections, rows, items, and polymorphic components, matching the User Interface REST API Record Layout.
Pass in recordLayouts in the uiapi field. For example, use objectApiName: ["Account"] to return the page layout metadata for the account object.
objectApiName - The object API name of a supported object. This argument is required.
recordTypeIds - A list of up to 10 record type IDs.
layoutConfigs - An array of layoutConfig types with these arguments to request different form factor and mode combinations per record type.
recordTypeId - A record type ID.
formFactor - Form factor that the FormFactor enum provides for the record type layout. Default value is LARGE.
mode - Mode that the LayoutMode enum provides for the record type layout. Default value is VIEW.
layoutType - Layout type that the LayoutType enum provides. Default value is FULL.
formFactor - Default form factor that the FormFactor enum provides for all layouts. Default value is LARGE.
mode - Default mode that the LayoutMode enum provides for all layouts. Default value is VIEW.
first - Number of layouts per page. Specify up to 10 layouts. Default value is 10.
after - Returns the results after the given cursor. See Paginate Results.
LayoutConnection Type
The LayoutConnection type represents a result set of record layouts that ties together the layouts and page info. Layouts are paginated by record type, with each edge representing one layout for one record type. See Paginate Results.
objectApiName - API name of the object that the layout is associated with.
recordTypeId - Record type ID.
saveOptions - A list of save options for the layout.
sections - A list of layout sections.
LayoutSaveOption Type
The LayoutSaveOption type is the save option for a record layout. Save options define behavior that occurs when objects are created or modified using the given layout. For example, for Cases and Leads, a “UseDefaultAssignmentRule” save option is exposed to control whether assignment rules are applied when Cases or Leads are created or edited.
editableForNew - Indicates whether the item can be edited when creating a record.
editableForUpdate - Indicates whether the item can be edited when updating a record.
label - Text label for the item.
layoutComponents - List of components that make up the item.
lookupIdApiName - ID field name of a lookup field.
required - Indicates whether the field is required in a layout when creating or updating a record. This information is useful if you want to render required fields with a different treatment, such as a red outline.
sortable - Indicates whether the item is sortable.
uiBehavior - UI behavior that the UiBehavior enum provides for the page and mini layout item. For other types of layouts, such as compact or quick action, the field is null. The value doesn’t reflect user-level or profile-level access.
LayoutComponent Interface
The LayoutComponent interface is polymorphic with six concrete implementations. The componentType field for each concrete implementation indicates the type.
The VisualforceLayoutComponent type contains these fields.
apiName - If a field powers this component, the API name of the field.
componentType - Value is VISUALFORCE_PAGE.
height - Height of the component.
showLabel - Indicates whether to show the section label with the component.
showScroll - Indicates whether to show the scroll bar on the component.
visualforceUrl - Visualforce URL.
width - Width of the component.
PageInfo Type
The PageInfo type contains relative position information, which shows where in the entire result set the current page is located. The PageInfo type is the same for every Connection type. See PageInfo Type.
Enumeration Types
The recordLayouts type has these enumerations.
FormFactor
The FormFactor enumeration specifies the layout display size for the record. The LARGE value is for desktop, the MEDIUM value is for tablet, and the SMALL value is for phone.
FormFactor Enum
1enum FormFactor{2 LARGE3 MEDIUM4 SMALL5}
LayoutComponentType
The LayoutComponementType enumeration indicates the layout component type.
The LayoutMode enumeration specifies the access mode for the record. The value determines which fields to get from a layout. Layouts have different fields for create, edit, and view modes. For example, formula fields are rendered in view mode, but not in create mode because they’re calculated at run time, like formulas in a spreadsheet.
LayoutMode Enum
1enum LayoutMode{2 CREATE3 EDIT4 VIEW5}
LayoutType
The LayoutType enumeration specifies the layout type for the record. The COMPACT value indicates a layout that contains a record’s key fields only.
LayoutType Enum
1enum LayoutType{2 FULL3 COMPACT4}
TabOrder
The TabOrder enumeration specifies the tab order for the items in a section.
TabOrder Enum
1enum TabOrder{2 LEFT_RIGHT3 TOP_DOWN4}
UiBehavior
The UiBehavior enumeration indicates the layout item behavior on page and mini layouts. The value doesn’t reflect user-level or profile-level access.
UiBehavior Enum
1enum UiBehavior{2 EDIT3 REQUIRED4 READONLY5}
WeblinkWindowType
The WeblinkWindowType enumeration indicates how a link behaves on open.