I am having a Account Page Layout. It is having 4 sections:

MySection (Inline Visualforce Page), Account Information, Address Information, Additional Information

I want get only names of above 4 sections.

So I've written a code, where I'm using Ajax toolkit in script.

<script src="../../soap/ajax/19.0/connection.js" type="text/javascript"></script>

Also I am using describeLayout() function to get all the page layout details.

But I'm getting only standard Page layout sections name. Not getting my inline visualforce section name.

<script type="text/javascript">

var output='';

function setupPage() {
 var result;


function editLayoutResults(result, obj) {
    output = '';

var allTheLayouts = result.getArray("layouts");
    for (var i = 0; i < allTheLayouts.length; i++){
        var layout = allTheLayouts[i];
        if (layout.editLayoutSections != null){
            var elSections = layout.getArray("editLayoutSections");
            for (var j = 0; j < elSections.length; j++){
                var els = elSections[j];

                output += '\n';
                output += '\n';
                output += els.heading 
                output += '\n';

Please note that I'm using "editLayoutSections" and "heading" here.

I have taken the reference from here


Visualforce elements can't appear on an edit layout at this point, so the section itself will be rendered empty. You need to instead use the detailLayoutSections element.

  • I have tried with 'detailLayoutSections', still no rsponse for visualforce element. – SFDC Geek Nov 21 '13 at 4:02
  • The label for the visualforce element will be in a DescribeLayoutComponent; the headers just show the actual labels. Maybe you're not looking at the right data? – sfdcfox Nov 21 '13 at 14:41
  • I have tried with DescribeLayoutComponent. It is only giving detail data of standard pagelayout sections, not for Visualforce page. – SFDC Geek Nov 21 '13 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.