Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

Why should we use sharing and without sharing in salesforce?

Asked by David Edmunds May 27, 2024 4.5K views 3 answers
Share

About this question

Why is "without sharing " used in an Apex class explicitly as we know that in the absence of the ' Without sharing' keyword, it is by default in the Apex class?

Your answer

3 Answers

Larry Mcleod Latest answer

Answered on Aug 5, 2024

You can't use Salesforce with or subway surfers without sharing because it nullifies the current user's sharing policies. If you don't want the current user's sharing restrictions implemented when you declare a class, use the sans sharing keywords. 

Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.