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
LeadforceLeadforce 

Is there a way to default a twist section as hidden section upon opening a visualforce <apex: detail// page?

I want to have a visualforce page open a standard account detail view except write in code that defaults the twistsections as hidden so the sections are collapsed by default.

Thanks so much!
EnreecoEnreeco
if you inspect the HTML of a custom layout you will see for a given seciton something like this:
<div class="pbSubheader brandTertiaryBrd tertiaryPalette" id="head_XXXXXXX_ep">
     <img src="/s.gif" . . . id="img_XXXXXXXXXXX" . . . >
And you can call the script:
twistSection(document.getElementById('img_XXXXXXXXXXX'));