Activity Forums Salesforce® Discussions What is the use of writing sharing rules in Salesforce?

  • shradha jain

    Member
    August 6, 2018 at 6:52 am

    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.

  • Parul

    Member
    September 9, 2018 at 6:51 pm

    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.

  • shariq

    Member
    September 15, 2018 at 10:58 am

    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.

  • Pooja

    Member
    February 5, 2020 at 1:35 pm

    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.

Popular Salesforce Blogs