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
1curl https://na1.salesforce.com/services/data/v29.0/sobjects/Object/describe/compactLayouts/ -H "Authorization: Bearer token"
Example JSON Response body
1{
2  "compactLayouts" : [ ],
3  "defaultCompactLayoutId" : "0AH000000000000GAA",
4  "recordTypeCompactLayoutMappings" : [ {
5    "recordTypeId" : "012000000000000AAA",
6    "compactLayoutId" : "Compact Layout ID"
7  } ]
8}
If you haven’t defined any compact layouts for an object, the compactLayoutId returns as Null.