Activity › Forums › Salesforce® Discussions › Difference between with sharing and without sharing in salesforce? Tagged: Salesforce Apex, Salesforce SOQL Salesforce® Discussions Difference between with sharing and without sharing in salesforce? Posted by Saurabh on April 25, 2017 at 1:19 PM Difference between with sharing and without sharing in salesforce ? Suraj replied 9 years, 1 month ago 2 Members · 1 Reply Salesforce ApexSalesforce SOQL 1 Reply 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. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me