How To Create Sharing Set In Salesforce
Every bit you may or may non know, Community Cloud, it'south my favorite of the Clouds. I know, I know, we aren't supposed to pick favorite children, simply of all my cloud children, I love this one the well-nigh for good reason. Why you ask? Well, tons of reasons, and information technology'southward because a Customs works and so much differently than regular Salesforce. You are taking your org and exposing things in an entirely different mode, sharing your information to your Customers and Partners. Yous are building your very own 'Ohana', creating a way for your external users to connect with one another.
With the concept of exposing your information externally, y'all will need to go along in heed security for your data. That is what this mini-series in my web log is all about. We will be reviewing a variety of items specific to Communities that are related to sharing. Let'south start with making certain nosotros have our basics down.
Basics
Let'south offset with our security pyramid, if you don't know this i you should re-create this image and save it. It will become your full general security BFF. Go along in listen, it is merely partially your Communities best friend, information technology only gets you lot through the basics.
OWD
Your Org Wide Defaults.
These are super important, they are the FOUNDATION of your org and when it comes to the Customs Cloud you need to realize there are 2 parts of your Org Broad Defaults (OWD), your internal sharing model and external sharing model. It'south the external sharing model that applies to the customs users, not the internal.
Role Bureaucracy
Roles are a bit funky – trust me here. Then this is where licenses come into play for the first fourth dimension. What I mean by that is depending on the license type determine whether or not you even have a function. And then let'due south break this downwardly beginning.
Customer Community (CC) – No Role
- These users are role-less
- This means they tin can't be added to public groups
- This too means that function based sharing won't work since they don't have roles
- If you only have Customer Community licenses you won't accept the ability to set how many roles your CC users have
- No Transmission Sharing allowed
Client Community Plus (CC+) – Roles
- Client Community Plus/Client Community Plus Login users have Roles
- You can prepare how many roles they have – from one-3
- The roles bachelor are User, Managing director, Executive
- You lot cannot modify part names
- When you set how many roles this is ORG Broad, not per community or per profile, but PER ORG
- These users tin be in Public Groups
- Manual Sharing Immune
Partner Community – Roles
- Partner Community/Partner Community Login users have Roles
- Y'all can gear up how many roles they take – from one-3
- The roles available are User, Manager, Executive
- You cannot change office names
- When you lot set how many roles this is ORG WIDE, not per community or per profile, only PER ORG
- These users can be in Public Groups
- Transmission Sharing Allowed
For CC+ and Partners you set up the Number of Roles for your org for each at:
Classic: Setup – Customize – Communities – Community Settings
Lightning: Setup – Feature Settings – Communities – Community Settings
Sharing Rules
Now y'all may recollect sharing rules are a great way to share things, I can just make a rule, that says if this is your business relationship I will share it with you. Problem in that location.. LIMITS! Y'all accept just 50 sharing rules per object that you can make. Every bit your community grows and yous call back about how many accounts you will be using or how many users y'all will be activating you will apace, and let me tell you, OH oh, oh, so quickly run out of sharing rules. No need to fear… Sharing sets are here to relieve the day!!
Sharing Sets
Sharing Sets are an amazing superpower that comes with your Communities. They are a way to share with Community License types and Customs users. Go along in mind, this blazon of security and sharing is but available for your community users, information technology is not available to share with internal users.
History vs Present
Once upon a time at that place needed to be a way to share with your Customer Community (CC) users. Since they don't take roles and aren't able to exist in Public Groups, they can't have manual sharing. And then to exercise then Salesforce came upwardly with a magical style to share on large volume levels that wouldn't take a huge price on the system. Sharing Sets. Now, as of recently, this functionality has been expanded to not simply be bachelor for Customer Community (CC) but also Client Community Plus (CC+) and Partner Licenses.
How They Work
Sharing Sets work different than most other sharing you volition think virtually in the Salesforce globe, and totally differently than the sharing that you lot are used to for internal users. Permit'southward break this part down….
You know those global variables that piece of work oh then awesomely in formulas? So here's how it works, Global Variables, friction match a variable brand a formula true. This is very like to how your Sharing Sets piece of work. Here we go:
You take your User.
- The User is always connected to a Contact (or Person Account), that's how yous created your community User.
- This Contact is the User.ContactId
- The Contact also has an Account, the User.Contact.AccountId
- Yous can likewise use the User.ContactAccount, these are your Account Contact Relationships
Then you take your records. Records can exist shared if they have a ContactId or AccountId. What Sharing Sets do is say hey I am this logged in User. My User.Contact.AccountId = ten, the AccountId on this record = x, because they match I can see this record.
If the AccountId on the record was y then information technology would non be visible.
Objects for Sharing Sets
The following objects can exist used with sharing sets:
Business relationship
Account sharing sets can control admission to Contract, Entitlement, and OrderItem objects
Asset
Campaign
Case
Contact
Custom Objects
Individual
Lead (contact Salesforce Client Support to enable)
Opportunity
Order
ServiceAppointment
Service Contract
User
Work Order
The Available Objects listing excludes:
- Objects with an organization-wide sharing setting of Public Read/Write
- Custom objects that don't have an business relationship or contact lookup field
Sharing Set Checklist
- Your Org Wide Defaults every bit Individual for your External Sharing Model
- Yous know the objects y'all desire to share
- You take your Custom Profiles created for your Community Users
- Your Custom Contour(s) have the objects with the proper Crud access
How to Fix it Upward
First off you need to know that yous can only accept one Sharing Set per Community Contour. Then that means you create the sharing fix for the contour and all the objects are within that sharing set. You tin only share each object i way. Objects must be Individual to show up in the list of objects for Sharing Sets. Sometimes you lot'll be looking for an object to detect out that your OWD has the object as Public Read/Write, switch it to Individual to do Sharing Sets on it. You demand your data secure.
Go to Setup and Admission your Community Settings
Archetype: Setup – Customize – Communities – Customs Settings – Sharing Sets
Lightning: Setup – Feature Settings – Communities – Community Settings – Sharing Sets
You'll see the 2nd section of the page is Sharing Sets. Unless yous accept your profiles sharing all objects the aforementioned manner, yous'll want to create different Sharing Sets for each profile. If they share objects via the same fields, then you lot can add multiple profiles to the same Sharing Set – that's totally acceptable.
Click New to create a new Sharing Ready.
And then you lot want to build out the Sharing Ready at present and add the contour(s) that are existence used. If this Sharing Set is for a single profile, I would name the Sharing Set subsequently that profile, if for multiple profiles, then employ a name that relates. Brand sure that you make full in your description, you want a cocky documenting org hither. What is the utilize of this Sharing Ready, which Customs, etc. Short and sugariness, but enough to read it and not have to dive in for the details.
And then you add your objects. If y'all have a large number of objects in your org you lot'll have to search for some, no demand to worry, they stay as you search and update the other object settings.
I have added to my org the Seat and Login version of the Custom: Partner Community profiles I created. I am going to setup the sharing for the Account and Opportunity objects with these two profiles on my Sharing Gear up.
I have called to share Accounts using the Account Contact Human relationship object that is used with Contacts to Multiple Accounts. This allows for my Partners to see the Accounts that they are related to equally a Contact in the Account Contact Human relationship related list for Contacts to Multiple Accounts. They are granted Read Access on these Accounts. This is done by matching the User.Contact.RelatedAccount to the Account.Id
For the Opportunity object, the requirements grant Read/Write admission to records to Partners when the User.Contact.AccountId matches the custom field Opportunity.Partner__c. If the User's Account match's this custom Account field then the User tin see the record.
Click Relieve on the Sharing Set and that's all it takes!
Scenarios
I'm going to run through a few scenarios here:
Scenario 1
Object to share: Opportunity
Profile to share with: Executive Partner Community Contour (a custom profile)
Field Used for sharing: Partner__c on the Opportunity Object
This will work past matching the User.Contact.AccountId with the Opportunity.Partner__c
Scenario 2
Object to share: Opportunity
Profile to share with: Executive Partner Customs Contour (a custom profile)
Field Used for sharing: Partner_1__c and Partner_2__c on the Opportunity Object
This volition not piece of work, you can only share an object with a profile based on 1 field with a sharing ready
Scenario 3
Object to Share: Buildings__c
Contour to share with: Custom: Developer Customs Profile (a CC Contour)
Field Used for sharing: Share with all Account__c listed on a child Lease__c object
This volition not piece of work, you lot cannot share based on matching with another object, the field y'all match has to be on the record you are sharing.
Summary
I hope the idea of using sharing sets and matching user lookup fields and related lookup fields to the lookup fields on a record has given yous some ideas about your Community and options for sharing. At present that Sharing Sets are available for all Community Licenses, it is amazing what awesome things can be done.
What are some absurd things you have done with Sharing Sets? Whatsoever unique issues you have solved? I would love to hear most them.
How To Create Sharing Set In Salesforce,
Source: https://meighanrockssf.com/2019/10/29/sharing-sets/
Posted by: allardoformetake1994.blogspot.com
0 Response to "How To Create Sharing Set In Salesforce"
Post a Comment