function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JoachimJoachim 

Profiles and Record Types

Hello,

How can I, using the API, retrieve all page layouts for a specific profile?

Joachim
SuperfellSuperfell
You can retrieve the layouts for the user by using the describeLayout call, or do you want to retrieve a layout for a profile that's not the users profile?
JoachimJoachim
Hello,

maybe I overlooked something, but I can't find anything in the doc that describes how to go from the user to the layout.
Help is appreciated!

Joachim
SuperfellSuperfell
the describeLayout call returns layout(s) based on the current user (i.e. the user that called login). If you have RecordTypes enabled on that entity, then you need to use the RecordTypeMapping information to select the correct layout based on the recordType of the particular instance you're trying to display.