Notifications
Announcements
No record found.
Is it possible to debug a business rule in Dynamics CRM? Appreciate your help here.
*This post is locked for comments
business rule is a javascript you can find it by press F12 on a form. It locate somewhere in Dynamic scenarios, but find it is not easy.
Hi Jomon,
I was able to find Mscrm.BusinessRulesScript.Initialize(s). After opening the CRM form press F12 to get the debugging tool opened then select Script then click Start Debugging and search for Mscrm.BusinessRulesScript.Initialize and I found them under Dynamic Scripts -> Script Block (154).
My question is how can we recognise which is the business rule we want to debug and also where to set the break point?
Hi
I do not think it would be useful to debug JavaScript code rendered for Business Rule.
You cannot put break point, the way you expect (like each condition or action as a single step).
So, you cannot debug a Business Rule.
[quote]My question is how can we recognise which is the business rule we want to debug and also where to set the break point?[/quote]
Set breakpoint you can directly in a block.
About "how can we recognise" - depends, what we need to do.
Business Rules has scarce functional. Usually they don't need to be debugged.
If it work not like you need, you can find a mistake in a rule definition directly without debugging actions.
There is an issue where I am getting an unsaved changes even after saving the record. This custom entity has only business rules and no java script attached to it, so I tried deactivating all the business rules and this unsaved changes was gone, but when I activated again then the same issue. So I just wanted to know whether is it possible to debug a business rule.
There is no mistake in the business rule since I am just setting the lookup field value in the custom entity.
Thanks
Akhil
You need to find a business rule, that make this changes.
try to turn off all rules and then turn on by one and refresh a page.
So, when you get a mistake, you'll find a rule, that make it.
Then deactivate it and edit to remove mistake.
As I said earlier I have done all this.
The business rule which causes this is just setting the lookup field value. There is no error in the rule still its showing unsaved changes for that particular rule. So I thought if it is possible to debug a business rule then I can find out the exact issue.
Anyways thanks.
Remove a setting lookup from a rule, and you'll get no mistake.
That's like deactivating the rule. I just have one condition that is to set the lookup field. If I remove the condition, then what's the purpose of creating the rule then?
Thanks anyways.
I replaced the business rule with java script and the unsaved changes is not showing now.
If you get any article regarding how to debug a business rule, please do share.
Thanks in advance.
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2