1

I have a requirement to get all Fields for a specific Page Layout as per Record Type.

I have searched lot over Google about any API/Apex related with page Layout but unfortunately not found any helpful post.

1 Answer 1

2

The Metadata API allows layouts to be accessed. See this example MetadataServiceExamples from the Apex Wrapper Salesforce Metadata API project for how to use this API from Apex.

Not that each API call is a web service call and so you need to be careful to not make the call from a context that does not allow web service calls. Also the volume of code is large, so if that is a problem you will need to remove the classes for the many API calls you are not making.

You must log in to answer this question.

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