I don't understand the use of fireonchange, how does it works and how to register a function to that event and how does it trigger and how to use it, what is the difference between onchange and fireonchange (are both connected?) I googled it but still confused. Can someone please explain with example? thank you
this is a good question, can someone please supply an example?
When you manually update a field, that will trigger the OnChange event of the field.
Now if you want to trigger the OnChange event from within a js function, you will call the fireOnchange.
fireOnChange is used to trigger an onChange event on an object (such as an attribute on the form) from your JavaScript code. The code/function that is triggered will be those (could be more than 1) that are registered for that object event - in supported Dynamics 365 JavaScript the functions are registered using addOnChange in your code (or in the form events)
(HTML and standard JavaScript onchange are roughly equivalent to addOnChange).
Hi Sahara,
Please take as reference following links:
https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg334409(v=crm.8)?redirectedfrom=MSDN#fireonchange
http://abhishekcrm.blogspot.com/2016/08/on-change-and-fire-on-change-in-crm-2016.html
http://bds-experts.com/how-to-fire-onchange-event-with-other-field-in-javascript/
https://exptechsolutions.blogspot.com/2017/05/ms-crm-xrmpagegetattributeattributefire.html
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 Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Rishabh Kanaskar 258
MVP-Daniyal Khaleel 170
Tom_Gioielli 116 Super User 2025 Season 2