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
Robert NikolovRobert Nikolov 

Restrict visibility to user to only see Leads with same region

Hello everyone, I'm new to Salesforce and I'm doing some exercices where I have to restrict the visibility or access to a group of users where they can only see the clients and contacts of the same region in the object Leads.

 

I imagine I have to create a group of profiles right? Then apply some sharing rules but I get completly lost. Can anyone explain me what would be the path to achieve it?

vishal-negandhivishal-negandhi

Hi Roberto, 

 

Step 1 : Set the OWD
For any object where you have at least one user in your org who should not have access to a record on an object, your organization wide default sharing setting for that object should be "Private".
This means users will only see their own data and data belonging to their subordinates (wherever grant access using heirarchy is enabled).


Step 2 : Set the Profile
From what I understood, you will have Read, Edit, Create and Delete (if you really need it!!) permissions on the profile for this object. If you go beyond these and give view all or modify all, it will override the sharing settings.


Step 3 : Create a group + Sharing rules
If the users who need access belong to different roles, then you add them to a group.
Then you will create a criteria based sharing rule in this instance and share the data with necessary access level with this group / role.

 

Hope this gets you started. Good luck!

Robert NikolovRobert Nikolov

Hello Vishal, first of all thanks a lot for answering!!

I've mistaken myself to something that I wasn't supposted to do. I didn't had to do anything at Leads.

This is what I'm being ask for:
"Only the users from the same region can see the clients and contact of his same region, and the users of the Commercial planification department and Management can see all, however, the Sell engineeers can also see the clients which they can participate. After assigning the commercial structure, each client has a team composed by the Account manager, Commercial and Engineer."

I'm looking at the trailheads but I'm very confused which thing is which, but can't manage to get a start with it.

Do I have to create a Custom field called Region inside Accounts? and then create the sharing rule?
The departments of Commercial planification, Management and Sell engineers what are they supposed to be? Roles, Groups? I'm very confused.
How can I know which Region I'm and compare it with the rest of the accounts. What does it mean with "each client has a team composed by Account manager, Commercial and Engineer" are they Roles which the accs/clients have?

Thanks for everything!