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 did not work for different user than creator

(0) ShareShare
ReportReport
Posted on by 423

I created a business rule in the entity 'account' which should lock some fields if the field 'imported' is on 'Yes'.

Business Rule: Account

Scope: All forms

Condition: If 'imported' equals "Yes".

Action: Lock name,....

The problem is that the rule does work for the admin user that created the rule, but not as a different user (like 'test' for example). I tried to gave the user 'test' all security roles but it didn't work.

What I am doing wrong?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    There is no scope to business rules that is specific to a user - the only thing that may affect the rule from running is:

    1. Cache - clear the browser cache to get the latest version of the rules

    2. Form security - check that the fields that are needed for the rule are on the form that the user has access to  - if the 'Imported' field is not on the form then the rule will not run.

    Hope this helps

    Scott

  • Verified answer
    Neil Parkhurst Profile Picture
    10,727 User Group Leader on at

    Assuming the test user has access rights to the entity the business rule runs against then your problem is unlikely to be permissions. As the scope of the business rule is not related to someone's permissions. It applies to all forms.

    Is the test user looking at the same form as the admin user? I have seen problems when a business rule is applied to all forms if the other forms don't include all of the fields referenced in the business rule.

    Failing that check the obvious stuff, like all changes are published, rule is active, clear cache. (Are you confident the test user is seeing the latest version of form / business rule?)

  • bernhards Profile Picture
    423 on at

    Hi Scott,

    thanks for your answer. I cleared the browser cache and did a factory reset in the internet explorer settings.

    The 'Imported' field is in the form as hidden. I changed it to visible and can now see it in the form. But the rule doesn't work...

  • bernhards Profile Picture
    423 on at

    That's it! I looked the form name and saw it was a different as the other. The form 'AHU' was set as main form with enabled security roles to the team 'AHU'. But it shows a wrong form 'Inform'.

    I tried to change it but had no other forms I can chose from. So I changed the language of the test user to the same as the admin user and reactivated the rule. And now it works!

    Thanks a lot :)

  • bernhards Profile Picture
    423 on at

    Unfortunately the problem isn't solved. It seems like it is a problem with the languages. If I use the basic language english everything works. But when I change the language to a different than it doesn't?

  • bernhards Profile Picture
    423 on at

    And I get this error message when I open some record in the account entity

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: ac50617c-4494-e511-80f2-3863bb354ff0, OwnerId: 49ea65b5-9192-e511-80f5-3863bb34fa70,  OwnerIdType: 8 and CallingUser: 49ea65b5-9192-e511-80f5-3863bb34fa70. ObjectTypeCode: 10023, objectBusinessUnitId: 9a8f60bb-048f-e511-80f4-3863bb349770, AccessRights: ReadAccess Detail: 
    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
      <ErrorCode>-2147187962</ErrorCode>
      <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
      <Message>SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: ac50617c-4494-e511-80f2-3863bb354ff0, OwnerId: 49ea65b5-9192-e511-80f5-3863bb34fa70,  OwnerIdType: 8 and CallingUser: 49ea65b5-9192-e511-80f5-3863bb34fa70. ObjectTypeCode: 10023, objectBusinessUnitId: 9a8f60bb-048f-e511-80f4-3863bb349770, AccessRights: ReadAccess </Message>
      <Timestamp>2015-11-30T13:36:59.511877Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />
    </OrganizationServiceFault>


  • bernhards Profile Picture
    423 on at

    Problem solved. The user had no organisation read rights on the costum entity in the security role.

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