Newer Version Available

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

Describe Layouts

Returns a list of layouts and descriptions. The list of fields and the layout name are returned.

URI
To return descriptions of global publisher layouts, the URI is: /vXX.X/sobjects/Global/describe/layouts/
For a layout description for a specific object, use /vXX.X/sobjects/Object/describe/layouts/
For a layout description for objects that have more than one record type defined, use /vXX.X/sobjects/Object/describe/layouts/<recordTypeId>. For example, the following URI requests the layout for a specific Contact record ID: /vXX.X/sobjects/Contact/describe/layouts/012xx00000024x5AAA. A GET request for objects that have more than one record type defined returns null for the layouts section of the response.
Formats
JSON, XML
HTTP Method
HEAD, GET
Authentication
Authorization: Bearer token
Parameters
None required
Example for getting global publisher layouts
1curl https://yourInstance.salesforce.com/services/data/v35.0/sobjects/Global/describe/layouts/ -H "Authorization: Bearer token"
Example JSON Response body contactlayout.json file
1[ { "name" : "contactlayout",
2    "searchColumns" : [ { "field" : "Account.Name",
3          "format" : null,
4          "label" : "Account Name",
5          "name" : "Name"
6        },
7        { "field" : "Account.Site",
8          "format" : null,
9          "label" : "Account Site",
10          "name" : "Site"
11        },
12        { "field" : "Account.Phone",
13          "format" : null,
14          "label" : "Phone",
15          "name" : "Phone"
16        },
17        { "field" : "User.Alias",
18          "format" : null,
19          "label" : "Account Owner Alias",
20          "name" : "Owner.Alias"
21        }
22      ]
23  },
24  { "label" : "Search Results",
25    "limitRows" : 25,
26    "searchColumns" : [ { "field" : "Contact.Name",
27          "format" : null,
28          "label" : "Name",
29          "name" : "Name"
30        },
31        { "field" : "Account.Name",
32          "format" : null,
33          "label" : "Account Name",
34          "name" : "Account.Name"
35        },
36        { "field" : "Account.Site",
37          "format" : null,
38          "label" : "Account Site",
39          "name" : "Account.Site"
40        },
41        { "field" : "Contact.Phone",
42          "format" : null,
43          "label" : "Phone",
44          "name" : "Phone"
45        },
46        { "field" : "Contact.Email",
47          "format" : null,
48          "label" : "Email",
49          "name" : "Email"
50        },
51        { "field" : "User.Alias",
52          "format" : null,
53          "label" : "Contact Owner Alias",
54          "name" : "Owner.Alias"
55        }
56      ]
57  },
58  { "label" : "Search Results",
59    "limitRows" : 25,
60    "searchColumns" : [ { "field" : "Lead.Name",
61          "format" : null,
62          "label" : "Name",
63          "name" : "Name"
64        },
65        { "field" : "Lead.Title",
66          "format" : null,
67          "label" : "Title",
68          "name" : "Title"
69        },
70        { "field" : "Lead.Phone",
71          "format" : null,
72          "label" : "Phone",
73          "name" : "Phone"
74        },
75        { "field" : "Lead.Company",
76          "format" : null,
77          "label" : "Company",
78          "name" : "Company"
79        },
80        { "field" : "Lead.Email",
81          "format" : null,
82          "label" : "Email",
83          "name" : "Email"
84        },
85        { "field" : "Lead.Status",
86          "format" : null,
87          "label" : "Lead Status",
88          "name" : "toLabel(Status)"
89        },
90        { "field" : "Name.Alias",
91          "format" : null,
92          "label" : "Owner Alias",
93          "name" : "Owner.Alias"
94        }
95      ]
96  },
97]