Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Can we setup a business rule so that it only executed on form load

(0) ShareShare
ReportReport
Posted on by 571

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

  • Verified answer
    SamiraM Profile Picture
    SamiraM 571 on at
    RE: Can we setup a business rule so that it only executed on form load

    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.

  • Verified answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,076 on at
    RE: Can we setup a business rule so that it only executed on form load

    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.

  • SamiraM Profile Picture
    SamiraM 571 on at
    RE: Can we setup a business rule so that it only executed on form load

    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?

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,076 on at
    RE: Can we setup a business rule so that it only executed on form load

    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.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 1,019 Super User 2025 Season 1 on at
    RE: Can we setup a business rule so that it only executed on form load

    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.

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.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans