Firing Business Rules when making JavaScript changes!
With the investment being made in Dynamics 365 around business rules I typically try and leverage them when possible. I’ve found at times it creates some challenges along the way. One specific challenge a college and I’ve ran into was when making JavaScript modifications to fields the related business rules were’t executing.
Making the business rules fire took a bit of research but it paid off as we’re able to continue to use Business Rules with JavaScript. A co-worker of mine Mike Wright found the answer and documentation. Microsoft has the documentation for the fireOnChange event you need to use on the Attribute here.
When the fireOnChange event is called it will call your related javascript event for that attribute as well execute any business rules associated to it. This is a great piece of knowledge to know when working with business rules and javascript.
Xrm.Page.getAttribute(arg).fireOnChange()
The more you know!
*This post is locked for comments