function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nununinununi 

Sharing records to community users

How do I share an account record (and associated contacts), so that it is available to external customer community users? The account record will be owned by an Internal user. 

This is basically for a VF page in my customer community where there is a contact lookup field. The external users have to select contacts accociated with a particular account "ABC" only. I have put in a lookup filter, but it is only working for the internal users. The external users are not able to see anything, most probably because they do not have access to he "ABC" account record. Please help!!!
Best Answer chosen by nununi
Vijay NagarathinamVijay Nagarathinam
Hi Nununi,

Use the following sharing set in your communities,
 
User:Contact.Account = Account:Id
I think it will be helpful for you.
 

All Answers

sfdc550sfdc550
To grant users access to selected users in the same community, you would typically create a sharing set if you deselected theCommunity User Visibility checkbox on the Sharing Settings page.
  • Click Customize --> Communities --> Settings.
  • In the Sharing Sets related list, click New to create a sharing set, or click Edit next to an existing sharing set.
  • In the Sharing Set Edit page, fill in the Label and Sharing Set Name fields. Label is the sharing set label as it appears on the user interface. Sharing Set Name is the unique name used by the API.
  • Enter a description.
  • Select the profiles of the users to whom you want to provide access.
  • Select the objects you want to grant access to.
The Available Objects list excludes:
  • Objects with an organization-wide sharing setting of Public Read/Write
  • Custom objects that don’t have an account or contact lookup field
  1. In the Configure Access section, click Set Up or Edit next to an object name to configure access for the selected profiles, or clickDel to remove access settings for an object.
  • Grant access based on an account or contact lookup:Select a value in the User drop-down list to determine the account or contact lookup on the user.
Select the a value in the Target Object field to determine the account or contact lookup on the target object.

For example, to grant access to all cases associated with an account identified on the user’s contact record, selectContact.Account and Account respectively.
  • Choose an access level of Read Only or Read/Write. (If the object’s organization-wide sharing setting is Public Read Only, then only Read/Write is available.)
  • Click Update, then click Save.
This is the best way to share records


If this answers you question, please mark it as "Best Answer" so it will help other community members too.

 
Vijay NagarathinamVijay Nagarathinam
Hi Nununi,

Use the following sharing set in your communities,
 
User:Contact.Account = Account:Id
I think it will be helpful for you.
 
This was selected as the best answer
nununinununi
This would allow me to give access to the account that the user belongs to, but not to an account that the user does not belong to. Am I right?
Ivan BakunIvan Bakun
Yes, it'll give access to accounts to which user belong.
Megan Hooser 7Megan Hooser 7
Sorry to jump in-but I'm trying to set something similar up and when I go to the sharing set page, no objects are available, even though they are all read/write for those profiles. What am I missing?
Rajesh3699Rajesh3699
Hi All, 

To see any custom objects in the "Sharing Sets" available objects ( Community Settings-> New Sharing Set-> Selected Objects), those custom objects Organization Wide Defaults should be "Private or "Public Read Only".

Its been mentioned differently in Implementation Guide and Help Text, refer screen shot below,

User-added imageUser-added image

Thank You
Adiga,,,