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.
*This post is locked for comments
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.
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
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?
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
Hi Nadeeja,
I have tested both independently and they work as expected:
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?
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.
Please see the below article which describes the Parent Scope scenario.
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
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?
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.
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156