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)

Business Rule

(0) ShareShare
ReportReport
Posted on by 7,316

Hi,
 
 I am trying to build a business rule based on a field's default value. This default value is set for a particular user. So whenever the user logs in and form loads field displays the default value.
 
 And based on this field, I want to set values of other fields through business rule. But nothing is happening when form loads except the default value I set for the user.
 
 If I enter manually the field's value, business rule gets fired. Why can't I make it to trigger when system changes the field's value rather than me?
 
 Thanks

*This post is locked for comments

I have the same question (0)
  • Deepesh161 Profile Picture
    6,317 on at

    How are you setting default value based on user while loading the form?

  • meenoo Profile Picture
    7,316 on at

    As I am Admin I am setting it in user entity record. So whenever he logs in, he can see the value for that field. For ex: I am setting his Default Project to 'XXX' in the user form so that his Project field defaults to 'XXX'.

    Thanks

  • Royal King Profile Picture
    27,686 on at

    After setting the default value field try to trigger onchange event  using script and check whether that kicks the Business rule or not?

    Xrm.Page.getAttribute(arg).fireOnChange()

  • Community Member Profile Picture
    on at

    Hi Meenoo,

    Are you using Business Rules as in the UI Business Rules, or are you enforcing your user rules based on JavaScript?

    If a default value is a set to a particular user, what happens if that user and another user access the form at the same time? You can't have both values in one field as there is only one record.

    To build a Business Rule in the UI, only 2013 and 2015 have this functionality and the capabilities are slightly different, but should still be achievable. If you create a business rule so that if X field equals to 'X' then Set field value X to X. You can create a number of these to meet your requirements.

  • meenoo Profile Picture
    7,316 on at

    Its UI business rule. Since the default value is set to a particular user, only that user sees that value when form is opened. For all the other users it will be blank field.

    Thanks

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Meenoo,

    The Business Rule can be set respectively by Form Security Role.

    If your purpose is to make certain users only, I think you can utilize this feature.

    So, can create multiple forms, one form specifically enable for this particular user by Security Role.

    And then you can set default value in the Business Rule

    missdynamicscrm.blogspot.com/.../crm-2013-setting-default-value-using.html

    Hope this helps!

    Thanks.

  • meenoo Profile Picture
    7,316 on at

    So, you mean to say I have to create a same new form for this particular user and set default values through business rules in there based on the role?

    Thanks

  • Aileen Gusni Profile Picture
    44,524 on at

    Ya, but this is to answer the form on load set the default value, Meeno.

    For this issue:

    " If I enter manually the field's value, business rule gets fired. Why can't I make it to trigger when system changes the field's value rather than me?"

    This is the standard for CRM Business Rule, Meenoo, it will only triggered on load plus on change (changes manually by users), this is also same concept for CRM JavaScript.

    But, you might try what Chitra suggested, I haven't tried, you can try.

    Xrm.Page.getAttribute(arg).fireOnChange()

    Hope it can help you.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Meenoo,

    I had similar case. What I did is I created on-demand workflow that made the changes to the existing records. Also I have a business rule activated that will certainly work when a new record is created.

    Hope this helps.

    Best regards,

    Sopho

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