I have a tricky situation. The scenario is this:
In the Opportunity Entity, I have a field called "Estimated Revenue". When this is updated with a value, what happens is that a fetchXML query using javascript executes updating the Product Entity field called "Estimated Totals". It does
this by using the "SUM" all Estimated Revenue. The Estimated Totals field essentially calculates ALL Opportunity Estimated Revenue fields to give a total. The example better explains:
[OPPORTUNITY] [Estimated Revenue - $400]
[OPPORTUNITY] [Estimated Revenue - $300]
[OPPORTUNITY] [Estimated Revenue - $100]
|
[PRODUCTS] [Estimated Totals - $800]
The problem is; I have this event hooked to the onSave handler. If I make an update to the Estimated Revenue in the Opportunity form, the new value isn't added to the XML query. Essentially the query doesn't take in the new value, until I save it a second
time.
There is a problem with the sequencing of events here, I am wondering what is a better approach to get the form to update first, then get the XML query to run second.
Any help appreciated.