Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Business rule did not work for different user than creator

(0) ShareShare
ReportReport
Posted on by 417

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

  • bernhards Profile Picture
    bernhards 417 on at
    RE: Business rule did not work for different user than creator

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

  • bernhards Profile Picture
    bernhards 417 on at
    RE: Business rule did not work for different user than creator

    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
    bernhards 417 on at
    RE: Business rule did not work for different user than creator

    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
    bernhards 417 on at
    RE: Business rule did not work for different user than creator

    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
    bernhards 417 on at
    RE: Business rule did not work for different user than creator

    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...

  • Verified answer
    Neil Parkhurst Profile Picture
    Neil Parkhurst 10,725 User Group Leader on at
    RE: Business rule did not work for different user than creator

    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?)

  • Verified answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: Business rule did not work for different user than creator

    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

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