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
forceguy.ax1264forceguy.ax1264 

VF section on pagelayout should load asynchronously.

I have placed a vf section on a page layout. the VF page does some processing and calls some service web services in the controller constructor, because of which it is making the page load really slow.


I believe according to salesforce page layout framework vf sections load synchronously.

 

Is there a way I can bring the page layout first and then have the vf page loaded asynchonously?

 

 

Avidev9Avidev9
Yes you can do it.
Its lil tricky but works well.

Do this.
1.Create A actionfunction and relate your webservice method to this action function,
<apex:actionFunction name="asyncFunction" action="{!myControllerActionFunct}" rerender="myWebservicePB"/>

2. Now near the end of your page add a script tag and call this action function
&lt;script&gt;asyncFunction()&lt;/script&gt;

This wont block ur page loading will allow you to call ur webservice asynchronously using js