Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Entity Permissions - View/Edit roles.

Posted on by Microsoft Employee

G'day, I'm trying to achieve what I think should be rather straightforward with Entity Permissions, but am obviously missing a step.

I have a custom entity with a 1-many and many-many relationship to Contact defined. I'm trying to use these relationships to determine whether a Contact can edit or view the entity and child entities. I have initially created two Entity Permissions with a Contact Scope to the two relationships and then subsequent Entity Permissions have a Parent Scope, with the relevant accesses. Any pointers would be great.

entityperm.PNG

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Entity Permissions - View/Edit roles.

    https://youtu.be/kYeQq7HZKTY

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Entity Permissions - View/Edit roles.

    As far as a Web Role solution goes, that's fine and dandy. However, it really doesn't suit my purposes, nor does it achieve what I thought Entity Permissions should. Thanks anyway, Nadeeja.

  • Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Entity Permissions - View/Edit roles.

    Hi Tim,

    Yes, you are correct.  What I thinking is that, when we have two different entity permissions for the same entity, for users in the same Web Role, the effective entity permissions could be the union of the two entity permissions.

    Therefore if we completely separate the permissions, we may fix the problem.

    For example.

    User A is assigned to Web Role A and has Entity Permission A

    User B is assigned to Web Role B and has Entity Permission B

    This way the User A should never has access granted in Entity Permission B.

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Entity Permissions - View/Edit roles.

    Hi Nadeeja,

    I have done this, though my understanding of the Web Roles was that you could specify the role for all authenticated users, or assign individual Contacts to a role. These roles don't give me the granular access that I expected form Entity Permissions. So, for instance, they make sense if I have a typical Manager/Employee relationship, but in my scenario a Manager of one Entity may be required to have access to another and vice versa.

    Is this correct?

  • Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Entity Permissions - View/Edit roles.

    Hi Tim,

    Are you adding both Entity Permissions to the same Web Role?

    What if you create different Web Roles ('Account Manager Role' and 'Authorised Viewer Role') and associate only one Entity Permission with each?

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Entity Permissions - View/Edit roles.

    Hi Nadeeja,

    I have tested both independently and they work as expected:

    1. When using my 'Account Manager' entity permissions the portal user in the 1-N relationship has read/create/write access.
    2. When using my 'Authorised Viewer' entity permission the portal users in the N-N relationship have only read access.

    However, when both are enabled the Authorised Viewer can also create records. Interestingly, this user cannot edit records. So it's partially working.

    Any ideas?

  • Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Entity Permissions - View/Edit roles.

    Hi Tim,

    You currently have many Entity Permissions defined and there may be a clash.  The approach I take is to get one scenario configured and tested, once the scenario is validated, then move on to the next scenario.  Then test both scenarios to make sure they still work. That way you know, when things start to break, which bit broke it.

    You have a mix of Contact Scope and Parent Scope permissions.  Contact Scope will restrict the Edit/View of the records to the records associated to the logged in user.  This allows you to have a specific permission per relationship.

    https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-permissions/

    Please see the below article which describes the Parent Scope scenario.

    https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-permissions/parental-scope-example/

    What happens if you create a Entity Permission for your ABN Tax Entity in Contact Scope without adding any Child Entity Permissions?

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Entity Permissions - View/Edit roles.

    I suppose, in a way, I am. I'm trying to give a different set of privileges to entities related to Contacts based on the relationship as below. Is this not possible?

    entperm.jpg

  • Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Entity Permissions - View/Edit roles.

    Hi Tim,

    Entity Permissions are used to restrict a logged in user's access to a record at Entity level. As far as I understand, you are trying to conditionally change the Entity Permissions, based on a value in a linked custom entity record on a Record level? I could be wrong. Can you please clarify a bit further?

    You can find information about how Parental Scope work from below article.

    https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/entity-permissions/parental-scope-example/

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans