0

We have setup a community using customer community plus user licenses. There is a requirement to setup data visibility according to account hierarchy. I have following type of account hierarchy -

-Account1
---- Child Account1
---- Child Account2
-Account2

As per above account hierarchy, community user/contact associated with Account1 should be able to access data which is shared to (or accessible by) users associated with "Child Account1" and "Child Account2".

  • what you have tried so far? – Santanu Boral Jan 9 '18 at 14:24
  • Nothing for this project but earlier i did some workaround using Account Ownership. If community user associated with Account1 is the owner of "Child Account1" then users under "Child Account1" comes under the role hierarchy of "Account1". But not sure whether it is valid solution. – LakhanP Jan 9 '18 at 14:42
0
+50

Customer Community Plus users can have sharing just like internal users. It sounds like you will need to use sharing rules - probably invoked via Apex triggers or Batch Apex - to share Account records appropriately.

For more info, see https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

  • HI David, I have around 6K customers/accounts and data is created by internal users only (some custom objects). Community users have read only access on reports and dashboard. Because of high number of customers i will not be able to use OOTB sharing rules. I am already using Apex Managed Sharing to share data with customers based on account lookup similarly i can modify for parent account as well however i was looking into some OOTB way to tweak role hierarchy so that users from parent account automatically get access to the records shared to users from child account. – LakhanP Jan 23 '18 at 7:48
  • The challenge with Apex managed sharing is, i would need to handle existing data as well e.g. parent account is enabled for community then i would need to share existing data to the users manually/through batch job. – LakhanP Jan 23 '18 at 7:51
  • You would need to run a batch job once, and then could rely on triggers and/or batch jobs after. There is no OOB way to do what you're talking about without some code, given what you've shared about the requirements. Yes, it's a challenge. It's also the best way to do it correctly. Best get moving on it! – DavidSchach Jan 23 '18 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.