If you have ever worked with the Dynamics CRM Opportunity, you know that it contains a function to recalculate the opportunity when you have selected System Calculated for the Revenue.
Here are the major areas of focus for this discussion:
When the user presses the Recalculate button on the Ribbon, all of the associated line items will be summaries and that number placed into the Est. Revenue field (estimatedvalue is the internal field name).
Est. Revenue Field OnChange Event
If you add an OnChange event to the Est. Revenue field, it will not be fired by the Recalculate Opportunity button. This is because the value of this field is not modified on the form, it is modified in the database.
If you have selected User Provided for the Revenue field, the Est. Revenue field becomes editable and the OnChange event will fire, after someone changes the value and leaves the field.
Recalculate Opportunity Page Life Cycle
When a user clicks the Recalculate Opportunity button, the following events will occur, in this order:
- The page will be saved, and the OnSave event will fire.
- The database record for the opportunity will be updated with the new Est. Revenue value.
- The page is reloaded, which will fire the OnLoad event.
What this means to you