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
alex_from_75015alex_from_75015 

Layout definition

Hi

Is there an api to get all layout description and not only the one attached to my profile (current function describeLayout) ?

With metadata api I can have list of layouts and Id but I could not find the api or function that gives me definition of a given layout (thanks to its id) or all layout (event the one not attached to my profile)

In Eclipse, I can get all layout definition

<?xml version="1.0" encoding="UTF-8"?>
<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
    <emailDefault>false</emailDefault>
    <headers>PersonalTagging</headers>
    <headers>PublicTagging</headers>
    <layoutSections>
        <customLabel>false</customLabel>
        <detailHeading>false</detailHeading>
        <editHeading>true</editHeading>
        <label>Account Information</label>
        <layoutColumns>
            <layoutItems>
                <behavior>Edit</behavior>
                <field>OwnerId</field>
            </layoutItems>

....

 

Thanks for your help

Regards

Best Answer chosen by Admin (Salesforce Developers) 

All Answers

alex_from_75015alex_from_75015

Hi

Thanks for your research

The only solution to get layout definition is to retrieve layout list thanks to list medatata then retrieve zip file of a given layout which is not very convenient

Nevertheless it seems to be the only solution

Regards

Alex