How to Provide Community Users access to records via lookup fields - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Edward SantandreaEdward Santandrea 

How to Provide Community Users access to records via lookup fields

I am new to Community Cloud - Using Community Cloud licenses.   I managed to setup a Community User (from a Contact) who is able to login to the community and view/edit/create their Account, (their) Contact record and other Related Contacts on that Account (as desired).

What I am trying to figure out is how to grant them access to a Person Account that is related to that Account via a custom Lookup field.   (so the Person Account has a lookup to the Account noted above)  I believe this is a combination of the Community Profile being granted object access (already done for the Account and Contact) as well as the "Sharing Set Settings" as I am currently using that to grant specific account/contact record access as noted above.    That said I do not see the "object" name I am looking for, but I do see two options ("Lookup Child" and "Lookup Parent") which seem to be the solution (?) however I have yet to strike the correct setting to grant that access to the related Person Account.  Am I on the right path?  Any suggestions?   I am really hoping its not a license restriction....
 
Jonathan FoxJonathan Fox
You should be able to do it, - https://help.salesforce.com/articleView?id=networks_setting_light_users.htm&type=5

However, make sure that the external OWD is set to private,
Ed SantandreaEd Santandrea
Thanks Jonathan.  I had reviewed that informaiton but still stuck.  I think the issue is around the configuration of each object within the Sharing Set
  1. Account - all set.  The Community User will have access to the Account that they are related to
  2. Contact - all set.  The Commnity User will have access all Contact records that share the same Accoount ID as that Community User
  3. Master Detail (child records to the Account) - all set. It seems granting them access to the Account will in turn grant them access to these child records (good).
  4. Related Person Account - Problem.
All of this has been around a Contact/Community User access to the Community and all the records that share the same account ID (1-3 above).

Incremental to that we have Person Accounts, with a Lookup to Account.  I would like to grant this Contact/Commnity User access to the Person Account as well.  It obviously does not share the same Account ID, but it does have a lookup field from the Person Account to the Account and so, how can I grant access?

A) We are already using "Access Mapping for Account" for #1 above.  There is no means to have another one for this Person Account. 
B) Contact is already being used as well
C) we cannot create another Sharing Set as they seem to be assigned to a Profile in a one to one relationship and I believe the Community User can only be assigned one Profile.

That leaves brings me back to some of the other "Available Objects" in the "Sharing Set".  There are several objects I recognize (Case, Campaign, some custom objects, etc), there are some I do not recognize per se (Installed packages, etc).  I am wondering if there is anything to leverage there knowing the Person Account has that Lookup to the Account....
Jonathan FoxJonathan Fox
Okay, sorry it didn't help. 

I think this is beacuse Person Accounts cannot have a direct relationship to Accounts.

https://help.salesforce.com/articleView?id=account_person_behavior.htm

I will keep digging to see if I can find a solution!!
Jonathan FoxJonathan Fox

Accounts:

Person accounts can't be included in account hierarchies.
Person accounts can't have direct relationships with other accounts or contacts. You can, however, use Contacts to Multiple Accounts to create indirect relationships between a person account and another person account, business account, or contact.



Could you try relating the person account to a contact and see if that contact can then see the person account?

Ed SantandreaEd Santandrea
After speaking with Support as well as the Community Cloud commuity, we have concluded that communities will support Accounts/Contacts or Person Accounts, but not in the same org (sharing/visbility wise).  We have dialed back some of our design as a result. 
Jonathan FoxJonathan Fox

Ah okay! Frustrating but good all around to know going forward. Maybe worthy of creating an idea for a future update. 


if you need anything else, please reach out and I'll try help. If not, do mark a 'best answer' so that the question is categorised as solved.

stay safe.