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
xxyyzzxxyyzz 

Roll-Up summary rerender bug?

I have recently come across an issue on a Visualforce page with rerendering an <apex:detail> section which contains a roll-up summary field. It appears that the rerender is performed before the roll-up summary field is recalculated  so the field on the VF page will always display the previous value

 

 

 

<apex:pageblock id="pageBlockToRerender">    
    <apex:detail relatedlist="False" subject="{!Stock_Order__c.id}"/>    		
</apex:pageblock>


<apex:commandbutton value="Add To Order" action="{!addToOrder}" rerender="pageBlockToRerender"/>  





 

 

In the example, clicking the command button creates a new order line item (which is a master detail of Stock_Order__c). The apex:detail contains a roll-up summary field which counts the number of order line items. The apex:detail section does get rerendered but this happens before the roll-up summary field is incremented.

 

Has anybody come across this issue before?

 

 

 

Muhammad AsifMuhammad Asif
I m experiencing the same issue. If someone has come across do let us know.

Thanks.