Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Business rule only works on new records but not on existing records

Posted on by Microsoft Employee

My Business rule works perfectly on new Account records but not on existing records. The scope of my business rule is on All forms.

Can somebody tell me what i did wrong? Or what I need to check?

Thanks!

*This post is locked for comments

  • Suggested answer
    Gee Bee Profile Picture
    Gee Bee 11,397 on at
    RE: Business rule only works on new records but not on existing records

    Set Default Value - is at the time of creating a record it would set a default value

    Set Field Value - set values to the field

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule only works on new records but not on existing records

    I found out that I should have used the option "Set Field Value" instead of "Set default value". Once I changed that it solved my problem.

    If:

    "Relationtype: Agent" is equal to "Yes"

    Then:

    Set default value of "Type organisation: Internet retailer" to "Yes"

    Else:

    Set default value of "Type organisation: Internet retailer" to "No"

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Business rule only works on new records but not on existing records

    It might also work on form "open"..  Here is a good analysis of what's happening behind the scene:

    community.dynamics.com/.../understanding-process-triggers-and-business-rule-internals

  • Suggested answer
    M I Mostafa Profile Picture
    M I Mostafa 4,257 on at
    RE: Business rule only works on new records but not on existing records

    Hi Elmar,

    The business rule is triggered when you change the value of the field. In your case, it is the "Relationtype: Agent" field. It will trigger on new and existing records but only if you change the value of this field.

    Hope this makes sense!

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Business rule only works on new records but not on existing records

    Hi Elmar,

     could you confirm there are no other rules/javascripts modifying the same fields? (if there are such rules, try creating a new field and see if your business rule works for that one. If it does, you'll need to dig into those other rules/scripts)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule only works on new records but not on existing records

    The business rule only needs to work when i'm using the Account form. It doesn't need to work for data import or to mass update data in the system. However it needs to work when i'm creating a new account and when I open a single existing single account record.

  • Suggested answer
    M I Mostafa Profile Picture
    M I Mostafa 4,257 on at
    RE: Business rule only works on new records but not on existing records

    Business rules work on updating the field that your condition is set to work on. Are you changing the values of existing records to test the business rule? The business rule won't work in all exiting records without you updating each record. If you want to apply the change to all existing records then you might want to configure a workflow, bulk edit or other job to apply the change on all records.

    Please mark as verified answer if this response has helped you.

  • Suggested answer
    M I Mostafa Profile Picture
    M I Mostafa 4,257 on at
    RE: Business rule only works on new records but not on existing records

    Business rules work on updating the field that your condition is set to work on. Are you changing the values of existing records to test the business rule? The business rule won't work in all exiting records without you updating the record. If you want to apply change to all existing records the you might want to configure a workflow, bulk edit or other job to apply the change on all records.

    Please mark as verified answer if this response has helped you.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule only works on new records but not on existing records

    Business-rule-does-not-work.png

    The scope of the rule is now set to Entity. I use Microsoft Dynamics 365.

    These are the conditions used:

    If:

    "Relationtype: Agent" is equal to "Yes"

    Then:

    Set default value of "Type organisation: Internet retailer" to "Yes"

    Else:

    Set default value of "Type organisation: Internet retailer" to "No"

  • Suggested answer
    M I Mostafa Profile Picture
    M I Mostafa 4,257 on at
    RE: Business rule only works on new records but not on existing records

    We need more information to be able to help. Which Dynamics version are you working on (online / on-prem)? 365 or 2016? If you can also provide a screen shot with the actual business rule, we may be able to find out the issue for you.

    Thanks

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans