cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Justin365
Helper II
Helper II

Restricting a record based on a relationship on associated logged in contact

Hi to give some background we have accounts that have "product restrictions" 

 

which means we don't want to show certain products to contacts associated with those accounts as an example

 

Contact logged in owned by Account A (no restrictions) can see all products
Contact logged in and owned by Account B (has 3 restricted products) - this user should not see any products they are restricted for

can this be achieved? 

2 REPLIES 2
chleverenz
Super User
Super User

Hi @Justin365 ,

yes, i do this in some projects. The key to this answer are ParentChild Permissions.

Basically, you define over a relation, what things are visible. In your case, there is either a direct relationship between accounts and products or you create a table, which maintains the relations. I usually do the latter one. So i create a table (an entity) which points to the account and to the product, which should be visible. For each product you have one entry in that table.

Then i create a tablepermission read for that table in accountscope to read all entries which habe the account of the contact. 

Then i create a Prental scoped permission on a product selecting the former created permission as a parent and allowing products linked to this entity (table) beeing visible. This should do the job.

 

Does this sound resolving your issue? If not ping me, may be i can explain a little more with an example.

 

Have fun,

  Christian

Ah, and the accounts beeing able to read all products should be given a role containg a tablepermission global to read all products 🙂

OliverRodrigues
Super User
Super User

@Justin365 please let us know if Christian's solution solved your problem or you need any further help with this




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Top Kudoed Authors
Users online (3,098)