How to get fields in page layout

2019-07-18 18:41发布

问题:

Using the REST API in Salesforce, I want to get a list of the fields in a page layout. Does anyone have any idea how I do this?

回答1:

You can't do this from the REST API, you can get it from the describeLayout call in the SOAP API.



回答2:

As of API version 28.0 (Summer '13), you can get the page layouts using /sobjects/<object>/describe/layouts/<recordtypeid>, e.g. /services/data/v28.0/sobjects/Account/describe/layouts/012A00000004vpXIAQ



回答3:

I'm not sure if the REST API can accomplish this, however you could use the Salesforce metadata API to do it.



回答4:

You can do with rest api by calling object request.

curl https://***yourInstance***.salesforce.com/services/data/v35.0/sobjects/Global/describe/layouts/ -H "Authorization: Bearer token"