Activity Forums Salesforce® Discussions What is the use of with sharing and without sharing in Salesforce?

  • Anjali

    Member
    October 7, 2020 at 1:19 pm

    With Sharing - Enforce the sharing rules that apply to current user. Without Sharing - Doesn't enforce the sharing rules.

  • Shweta

    Member
    October 13, 2020 at 3:45 pm

    We can use the with sharing keywords when declaring a class to enforce the sharing rules that apply to the current user.
    We can use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced<font color="#800000">.</font>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos