If we have custom Ribbon button and custom JS code to perform some action on click of it or to simply display/hide Ribbon button based on some condition in JS code in version prior to D365 V9, then following changes need to be done to make them work in D365 V9.
- Using Ribbon Workbench, add a new parameter to the command/enable rule/display rule of type CRM Parameter:
- Select the value of CRM Parameter as PrimaryControl:
- After making above changes Click on Publish.
- Then coming to JS code, pass executionContext as parameter to the method used in command/enable rule/display rule.
NOTE: Here, we talked about only ribbon button related changes wrt D365 V9. Other client API changes still need to be done as part of upgrade activities as mentioned here.
Hope it helps!!