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';
}
}
}
}
</script>
Please note that I'm using "editLayoutSections" and "heading" here.
I have taken the reference from here