Newer Version Available

This content describes an older version of this product. View Latest

SObject CompactLayouts

Returns a list of compact layouts for a specific object. This resource is available in REST API version 29.0 and later.

Syntax

URI
For a compact layout description for a specific object, use /vXX.X/sobjects/Object/describe/compactLayouts/
Formats
JSON, XML
HTTP methods
HEAD, GET
Authentication
Authorization: Bearer token
Request parameters
None required

Example

Getting compact layouts
Example JSON Response body
This sample JSON response is for compact layouts created on the Account object. In this example, only one custom compact layout was created for Account. The custom compact layout is assigned as the primary compact layout for the object, and it contains two fields: Account Name and Phone.
If you haven’t defined any compact layouts for an object, the compactLayoutId returns as Null.