4

I am trying to use newly exposed endpoint in API v.28 i.e. /describe/layouts

Out of the various possible REST resources mentioned for describing layout, I can only use this one

For a layout description for a specific object, use /vXX.X/sobjects/Object/describe/layouts/ This call only returns a single default layout for the object.

All other REST resources like

  • Descriptions of global layouts: /vXX.X/sobjects/Global/describe/layouts/
  • Describe a single layout: v28.0/sobjects/global/describe/layouts/ContactLayout

I am getting

[{"message":"The requested resource does not exist","errorCode":"NOT_FOUND"}]

My requirement is to fetch all layouts for an object, or get layout for an object by name.

Thanks !

1 Answer 1

2

The /vXX.X/sobjects/Global/describe/layouts/ call doesn't return the collection of layouts for all SObjects, but rather the layouts for the 'global publisher'. This call only works if you have Setup | App Setup | Chatter | Settings | Enable Publisher Actions checked, in which case, you will receive a response along the lines of

{
  "id" : "00hE0000000QO6qIAG",
  "relatedLists" : [ ],
  "quickActionList" : {
    "quickActionListItems" : [ {
      "type" : "Post",
      "label" : "Post",
      "iconUrl" : null,
      "quickActionName" : "FeedItem.TextPost",
      "miniIconUrl" : null,
      "targetSobjectType" : null
    }, {
      "type" : "Post",
      "label" : "File",
      "iconUrl" : null,
      "quickActionName" : "FeedItem.ContentPost",
      "miniIconUrl" : null,
      "targetSobjectType" : null
    }, {
      "type" : "Post",
      "label" : "Link",
      "iconUrl" : null,
      "quickActionName" : "FeedItem.LinkPost",
      "miniIconUrl" : null,
      "targetSobjectType" : null
    }, {
      "type" : "Post",
      "label" : "Poll",
      "iconUrl" : null,
      "quickActionName" : "FeedItem.PollPost",
      "miniIconUrl" : null,
      "targetSobjectType" : null
    } ]
  },
  "buttonLayoutSection" : null,
  "detailLayoutSections" : [ ],
  "editLayoutSections" : [ ],
  "multirowEditLayoutSections" : [ ],
  "offlineLinks" : [ ]
}

I'm investigating how to obtain all the layouts for a given SObject - I'll update here when I discover the answer.

1
  • +1 Thanks a lot Pat for sharing this finding, I will wait for the second update ! Commented Jul 2, 2013 at 7:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .