Activity › Forums › Salesforce® Discussions › What is the use of writing sharing rules in Salesforce?
-
What is the use of writing sharing rules in Salesforce?
Posted by Sanjana on July 2, 2018 at 12:59 PMWhat is the use of writing sharing rules in Salesforce?
Pooja replied 6 years, 4 months ago 5 Members · 4 Replies -
4 Replies
-
Hello Sanjana,
You can use sharing rules to extend sharing access to users in public groups or roles. As with role hierarchies, sharing rules can never be stricter than your org-wide default settings. Sharing rules just allow greater access for particular users.If you have org-wide sharing defaults of Public Read Only or Private, you can open access back up for some users with sharing rules. This enables you to make automatic exceptions to your org-wide sharing settings for selected sets of users.
Thanks.
- [adinserter block='9']
-
Sharing rules are used by administrators to automatically grant users within a given group or role access to records owned by a specific group of users. Sharing rules cannot be added to a package and cannot be used to support sharing logic for apps installed from Force.com AppExchange.
Sharing rules can be based on record ownership or other criteria. You can’t use Apex to create criteria-based sharing rules. Also, criteria-based sharing cannot be tested using Apex.
Steps to Create Sharing Rules
Step 1: Create a public group which will have the users who need specific access. Go to the link path, Setup home → Users → Public Groups → New Group.
Step 2:
Now we create the sharing rule for the above public group. Go to the link path Setup Home → Security → Sharing settings. From the dropdown of Manage Sharing settings for, choose Campaigns.Then under Campaign sharing rules, click on the button New. Provide the details for the new sharing rule as shown below. We select a criteria to give access to records for which the value of the field Campaign name is camp_x.
Thanks.
-
Hi,
Use sharing rules to extend sharing access to users in public groups or roles. As with role hierarchies, sharing rules can never be stricter than your org-wide default settings. They just allow greater access for particular users. You can share records owned by certain users or meeting certain criteria.
Hope this helps.
-
Sharing rules can be based on record ownership or other criteria. You can’t use Apex to create criteria-based sharing rules. Also, criteria-based sharing cannot be tested using Apex.They just allow greater access for particular users. You can share records owned by certain users or meeting certain criteria.You can use sharing rules to extend sharing access to users in public groups or roles.
Log In to reply.