+ 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.