How to recalculate all the computed fields

Hi, Could u please tell me which event and which method should I use to recalculate all the computed fields before saving the doc?

 I tried refresh, reload in events: queryopen, querysave, postopen, postrecalc. However, it didn't work. Some computed fields still contain the old values.

 Thanks.

Subject: how to recalculate all the computed fields

I think doc.ComputeWithForm method or uidoc.Refresh should do the trick.