+ Start a Discussion
Drew Salazar 5Drew Salazar 5 

Is there a way to default a twistsection as hide 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.
Best Answer chosen by Drew Salazar 5
JeeTJeeT
Add this below JavaScript after your <apex:detail .... /> Component
<script>
    twistAllSections(false);
</script>
a Sample Visualforce Page:
<apex:page standardController="Account">

    <apex:detail subject="{!Account.id}" id="dtailPage"/>
<script>
    twistAllSections(false);
</script>
</apex:page>

 

All Answers

JeeTJeeT
Add this below JavaScript after your <apex:detail .... /> Component
<script>
    twistAllSections(false);
</script>
a Sample Visualforce Page:
<apex:page standardController="Account">

    <apex:detail subject="{!Account.id}" id="dtailPage"/>
<script>
    twistAllSections(false);
</script>
</apex:page>

 
This was selected as the best answer
Drew Salazar 5Drew Salazar 5
You are a GoD!!!  Thank you!!!