In the release 2 2019, Microsoft introduced the ability to modify the Opportunity Close dialog using the Quick Create Form. In this blog, we will discuss the ability to apply a business logic to the Opportunity Close Quick Create form according to the context of the opportunity closure.
Change the “Close Date” label depending on the context of the opportunity closure. Indeed, if we close the opportunity as won, we will display “Win date”. Otherwise, it will display “Lose date”.
Close as Won:
Close as Lost:
The context of the closure (Won/Lost) is stored in a parameter named “param_won”. This parameter is accessible from the data object of the page context input. This parameter “param_won” is a boolean which is equal to true in the case of closing a won opportunity and equal to false in the case of closing a lost opportunity.
Using this parameter, it will be possible to implement a logic depending on the context of the opportunity closure. The code below changes the label dynamically as described at the beginning of this blog.
This function should be executed when loading the OpportunityClose entity’s quick creation form.
Finally, this idea is discussed on the community.dynamics.com forum. You can read the discussion on this link.