In the previous lecture we already discussed about the sharing rules what are sharing rules in which
scenario we use sharing rules.
What are the different types of sharing rules and all these.
Among that we discussed in detail about the owner based sharing rules.
Now let's study about the other type of sharing that is a criteria based shared rules criteria based
sharing rules.
As the name says this sharing rule is configured based on some criteria.
So how do we build that criteria.
The criteria is built based on the field value of records because we very well know that sharing rules
are used for giving record level access.
So based on the field values of the records we will be configuring this criteria based sharing rules
for this to understand this criteria based share and rule have considered a business scenario that now
we have leads and we need to share all the leads that country as United States of America with a group
of people that does the initial sales reps.
So this is our business scenario.
So how do we do that.
So then we have such a business scenario.
First we need to understand what the current configuration is in our system.
Here we are talking about leads and when we check the order beauty of leads it is private meaning we
cannot access other leads leads owned by other owners.
Basically and here we have two users and now we want to share all USA leads.
The DNA sales reps so wholly are basically going to work this out as will be creating a public group
like any sales reps and let's assign USER 2 to the public group once and then we'll be creating a sharing
rule and we'll share.
The USA leads with this particular public group.
This is all over I will be configuring the sharing rules so before we go ahead and create our sharing
rule let's check the existing scenario in our sales bazaar.
I have long been as user too.
And let me go for leads go for all leads.
We are not seeing any leads as such.
Why.
Because the all the beauty of leads is private.
So basically will I be able to see others records.
This user too does not own any leads of his own.
So basically there are no leads out there as simple as that.
So after we create that sharing rule USER 2 should have access to all USA leads so as part of that let's
first create a public group.
Let me log in as the original user.
I have logged in as User 1 and I have also created a public group.
We already know what the public group is how to create public groups how to use public groups who have
discussed in detail in our basic admin course.
So let me not going to all those have already created a public group and there is only one user in my
public group that is user 2.
So no this public group is created.
We have added all the users but for our requirement as such in real time what we will do this we re
creating a public group and their sales reps and they'll be adding all they and their sales reps in
this public group who all needs access to the U.S. leads.
But here we have only 2 users so I've just added USER 2.
So now let's create sharing.
So for creating a sharing Rubino will be creating a lead a sharing road so hopefully sharing rules.
Fill in the details here and here choose the rule type as based on criteria.
We are basically creating a criteria based sharing rule and our criteria is based on company.
So sorry.
Country so look for Country
USA and share with a public group.
Choose our public group.
Any sales rep and also choose the level of access that you want to give any sales reps
perfect.
So either sharing rule is no created.
Yeah.
It isn't progress.
And once it is done you will be getting an email about the completion once a sharing rule is successfully
created.
You also get an email notification and once that is configured for testing purpose.
What I've done is I've logged in as user to go for leads all open leads he'd go and you should be able
to see all the leads with country s USA.
So this is called criteria based sharing rules sharing rules which are created based on some criteria.
As I already mentioned this is this criteria based sharing rules is one of the very effective tools
that we use in real time but different scenarios and different objects.
We use them very effectively to better have access to records.