I have created custom action to generate sor code on Account entity in dynamics CRM. I am calling this custom action from ribbon button using XRM.webapi.execute . Ribbon button has display rule javascript code to hide the button when SOR code field contains data...we are updating the account sor code in custom action. We are able to refresh the form but when ribbon button is still displayed even though SOR code field has data populated from custom action plugin code...how to fix this?
The Core Issue:
Xrm.WebApi.execute
The Solution: Force Ribbon Re-evaluation
The most reliable way to solve this is to force a re-evaluation of the ribbon after your custom action completes and the form is refreshed.
Here's the JavaScript you should use:
Key Points:
Xrm.Utility.forceControlRefresh();
formContext.data.refresh()
Why This Works:
Troubleshooting:
If you are still experiencing issues, please provide the following information:
This additional information will help me provide more specific troubleshooting guidance.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Daniyal Khaleel 152
DAnny3211 89
Tom_Gioielli 67 Super User 2025 Season 2