Bringing Records In
هذا المحتوى غير متوفر بلغتك بعد.
Module 2 of 6 in the chapter Sharing Sets, Share Groups and Data Sharing for High-Volume Users, chapter 15 of Securing Salesforce: Sharing and Visibility. Each module stands on its own.
The question this module answers: A site user should see their own company’s orders and nobody else’s. With no role and no share table, how do you give them exactly that?
Module 1 left the person at Lakeview Café seeing their account, their contact and the records they own. Now the restaurant wants its staff to see the restaurant’s orders. Every order has a lookup to the account that placed it. The Order object is Private externally, as it should be. So what do we do?
Two steps: the object, then the records
Section titled “Two steps: the object, then the records”In class I give it in two steps.
First, object access. The user needs Read on the object, or Read, Create and Edit if they’ll add records. Sharing never gives object access; it only opens records on an object the user can already reach. In my video I gave it through the profile, and I said in the same breath that you should be moving to permission sets. Do that: a permission set for the site users who need orders.
Second, the sharing set. That’s what decides which orders they see.
“A sharing set grants site users access to any record associated with an account or contact that matches the user’s account or contact” (Create a Sharing Set for Experience Cloud Site Users (opens in a new tab), Salesforce Help, checked 2026-11-26). So it’s a match. The sharing set looks at the user, finds an account or a contact, looks at the record, finds an account or a contact, and if they’re the same, the user gets the record.
That’s why I keep saying the record needs a link. A sharing set has to point to a lookup to either an account or a contact. If the Order has a lookup to the account, any user whose contact sits on that account can see that account’s orders. Lakeview Café’s staff see Lakeview Café’s orders. Another restaurant’s staff see their own, and never Lakeview’s.
The access mapping: a field on the user, a field on the record
Section titled “The access mapping: a field on the user, a field on the record”Salesforce calls the match an access mapping. You set one for each object in the sharing set, and it has two halves (same page):
- User: where to find the account or contact on the user. “To determine the account or contact lookup on the user, select a value in the User dropdown list.”
- Target Object: where to find the account or contact on the record. “To determine the account or contact lookup on the target object, select a value in the Target Object field.”
And the rule that holds them together: “Both selected fields must point to either an account or contact.” Account to account, or contact to contact.
For the restaurant’s orders, that’s Contact.Account on the user (the account on the user’s contact) and Account on the Order. Salesforce’s own example is the same shape with cases: “to grant access to all cases associated with an account identified on the user’s contact record, select Contact.Account and then Account.”
Now say the kitchen equipment maker also has a Service Visit object, booked by one person at the restaurant, with a lookup to that person’s contact. Should the whole restaurant see every service visit? Maybe not. A mapping of Contact on the user to Contact on the Service Visit gives each person only the visits on their own contact. That’s what I meant in class: orders under her account, or the things under her contact. You choose, object by object, which link decides.
Indirect lookups
Section titled “Indirect lookups”The link doesn’t have to be one step. “Access mappings support indirect lookups from the user and target record to the account or contact” (same page). The Contact.Account on the user is already one: from the user, to their contact, to that contact’s account. On the record side, the same idea lets a record reach the account through another lookup.
A contact at more than one account
Section titled “A contact at more than one account”Some people work for more than one company: a manager who looks after three restaurants, say. With Contacts to Multiple Accounts, one contact can be related to several accounts. A sharing set can follow all of them: it can reach records that look up to any account the contact is related to: “Select Contact.RelatedAccount and Account respectively, and make sure that the relevant account-contact relationships are active” (same page).
Notice the last part. The relationship has to be active. End the relationship, and the access through it goes with it.
Read Only or Read/Write
Section titled “Read Only or Read/Write”For each object you choose the access: “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.)” (same page). That last part makes sense. If the external default already gives everyone Read, a sharing set that only gave Read would add nothing.
Pick the smaller one unless they need to edit. A restaurant checking its orders needs Read Only. If their staff update the delivery notes on an order, that’s Read/Write, and it’s Read/Write on every order on their account, for everyone in the sharing set.
Which objects you can choose
Section titled “Which objects you can choose”The list of objects is long: account, contact, case, order, opportunity, asset, work order, service appointment, custom objects, and many industry objects (same page). A few things about it:
- Account sharing sets reach a few other objects too: “Account sharing sets can control access to Contract, Entitlement, and OrderItem objects.”
- Some objects are left out: “Objects with an org-wide sharing setting of Public Read/Write” (there’s nothing to add), and “Custom objects that don’t have an account or contact lookup field” (there’s nothing to match on).
- Some need a switch first. Knowledge is “available only when the Knowledge standard sharing org preference is enabled,” and leads need a call to Salesforce Customer Support to enable.
So if your custom object isn’t in the list, ask the first question first: does it have a lookup to the account or the contact? If it doesn’t, a sharing set can’t see it. That’s a data model decision, and it’s one to make before the site goes live, not after.
Who gets it, and where
Section titled “Who gets it, and where”Profiles. You pick the profiles of the users who get the sharing set, and “You can have one sharing set per profile only” (same page). One sharing set can hold many objects and many profiles, but a profile can’t sit in two. So plan it as one sharing set per kind of site user: everything a restaurant’s staff should see in one place. In my demo, the first thing I decide is which profile to give it to.
Every site. “A sharing set applies across all sites that a user is a member of” (same page). It isn’t set per site. If the same restaurant staff are members of a support site and an ordering site, the sharing set follows them into both.
Which seats? Salesforce describes sharing sets for Experience Cloud site users, chosen by profile, and that’s all its sharing set page says about who. It’s the share groups that come with them that are limited: “Share groups functionality isn’t available to users with Customer Community Plus and Partner Community licenses” (same page). Sharing sets are built for the cheap seats, which have nothing else, and that’s where you’ll use them most.
Then save it, and the restaurant’s staff see the restaurant’s orders. Nobody wrote a rule, nobody built a group, and there’s no row in a share table. Module 3 is about what that last part means, and what sharing sets don’t do.
Test knowledge. Know the two steps: object access through a permission set or profile, then the sharing set for the records. Know the access mapping: a field on the user and a field on the target object, both pointing to an account or both to a contact, such as Contact.Account to Account. Know Contact.RelatedAccount for contacts to multiple accounts, with active relationships. Know the access levels, Read Only or Read/Write, and only Read/Write when the default is Public Read Only. Know one sharing set per profile, that a sharing set applies across all of a user’s sites, and that objects without an account or contact lookup can’t be chosen. A likely area, not a known question.
What an architect decides here
Section titled “What an architect decides here”- For each object a site user needs, whether it has a lookup to the account or the contact, and adding one in the data model if it doesn’t.
- For each object, whether the whole company sees it (account to account) or only the person on it (contact to contact).
- Read Only or Read/Write for each object, remembering Read/Write is for everyone on the account.
- One sharing set per kind of site user, by profile, knowing it follows them into every site they belong to.
- For people who work for more than one company, whether Contact.RelatedAccount should open all their accounts’ records.
Beyond the exam: what AI changes. A sharing set is a wide door: every record on the account, on every object in the set, for every user on those profiles. An agent on the site walks through the whole door at once, and can summarize a restaurant’s whole order history in one answer. Before an agent goes live, list the objects in each sharing set and ask whether every person at the customer should see every record on each one. If the answer for an object is “only the person on it,” that object wants a contact mapping, not an account mapping. Chapter 20 covers agents.
Explore
Section titled “Explore”- Create a Sharing Set for Experience Cloud Site Users (opens in a new tab), Salesforce Help (checked 2026-11-26)
