Hi ,
I have created the business rule and my requirement is that the business rule should be executed only on form load.
*This post is locked for comments
Hi ,
I have created the business rule and my requirement is that the business rule should be executed only on form load.
*This post is locked for comments
Just for the information i have achieved the required behaviour by adding javascript function on form load. To check whether it is create or update form i have used Xrm.Page.ui.getFormType() . This way my javascript is executed only on new and not on update.
No, you can't call a business rule from a workflow. The workflow executes only on the triggers provided (like Record creation, updation, deletion, assignment, status change etc.). Workflows can run synchronously or asynchronously. Business rules are more or less same as sync workflows.
See: http://gonzaloruizcrm.blogspot.com/2016/08/business-rules-vs-sync-workflows-in-crm.html
Hope this helps.
Ok I this case business rule is not useful and I need to achieve this via JavaScript.
Also one more point. Can I call business rule from workflow and workflow is only executed when form loads?
Hi,
Business rules can run when a form is loaded or when a field value changes (causing the condition to be evaluated).
As suggested by Adrian Begovich, you can register an on-load Javascript function in the Form Properties in the Form Editoe inorder to exclusively run the logic on form-load.
Hope this helps.
Hi Dynamics User,
I do not think it is possible to have a Business Rule that executes only on form load. However, you can create a JavaScript file that mimics the behaviour of your intended Business Rule, and have that run only on form load.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,321
Most Valuable Professional
nmaenpaa
101,156