web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Entity Scope business rule not updating record without opening

(0) ShareShare
ReportReport
Posted on by 3,070

Hi all,

I have a business rule on my Opportunity Product entity that is set to Entity scope that copies one field value to another field, however it does not update the field unless I open the specific record. 

The fields that I have are as follows:

1. new_opportunitystatus - a calculated option set field that copies the Opportunity status (i.e. Open, Lost or Won)

2. new_opportunitystatuscopy - an non-calculated option set field that is a duplicate of new_opportunitystatus

The business rule is below:

716357.Capture.PNG

My understanding is that Entity scope business rules run server-side, and therefore don't need you to open the form in order to work.  The issue I have is that this business rule won't function unless I open the form

Can anyone advise what may be the cause of this, or how to get around it?  We can't update opportunity Products via workflow, and I need the field to be updated as it is used as a filter for some rollup fields on the Product entity. 

Any advice would be appreciated

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    Yes, when business rule scope it set to entity it also runs on server side, but only when you are setting it's value through server side code, it seems you are not setting this field that's why it's firing when you are opening that record, please check our post regarding entity scope:

    http://himbap.com/blog/?p=2664

    Thanks

  • Ryan Maclean Profile Picture
    3,070 on at

    Hi Mahen,

    I'm not sure what you mean here.  The new_opportunitystatus field is set when the related Opportunity Status is changed, but it still doesn't trigger the business rule.  As this is a server-side transaction, my interpretation is that it should trigger the business rule

  • Mahendar Pal Profile Picture
    45,095 on at

    Can you please share some more details how this custom field is populated when opportunity status changed, do you have any code which is doing this ??

    Let me know.

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi Ryan,

     I think the problem might be that business rules don't run just like that - they are "triggered" when one of the fields used in the business rule is updated.. But, since the only field you are using there is "Opportunity Status", the rule does not trigger (since it's a calculated field, so no workflows/plugins would trigger on that field.. it's, likely, the same for the business rules)

     If that's the case, you may have to go back to using a workflow registered on the opportunity entity (with a custom workflow activity).

  • Preetam Yengkokpam Profile Picture
    197 on at

    I know its an old post but very interrested to know on it.

    I have a custom entity which has a Rollup Field from its related entity. Whenever this Rollup Field is updated by system job or manually, I want to copy its value to another field by using Business Rules configured on Entity Scope. Since the Business Rule is Entity Scope, I thought the value will be copied without being opened the form but it is not.

    Can you explain if the Business Rule on Entity Scope should work for Rollup Fields update?

  • vbharath24 Profile Picture
    on at

    Hey @Ryan, did you ever find the solution to this? I'm facing a near-exact issue.

  • Suggested answer
    Preetam Yengkokpam Profile Picture
    197 on at

    Hi Bharath,

    Please find the definitions for each of the scope below:

    •  The business rule is executed only on the client, if the rule’s scope is set at a form level (all forms or a specific form). The rules are executed when a record form is loaded and updated.

    •  The business rule is executed both on the server and client, if the rule’s scope is set at an entity level. The rules on the server-side are executed when a record is created or saved.

    docs.microsoft.com/.../dn531086(v=crm.7)

    So, we cannot use Business Rule if we want to update anything without opening the record form unless you have any means to save the record without opening it.

    Thank you,

    Preetam

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans