Activity Forums Salesforce® Discussions Difference between with sharing and without sharing in salesforce?

  • Suraj

    Member
    April 25, 2017 at 1:25 pm

    Hi Saurabh,

    We use with sharing and without sharing on a class to specify whether or not to enforce sharing rules.

    The with sharing keyword allows you to specify that the sharing rules for the current user be taken into account for a class.

    Use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos