function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SR02SR02 

without sharing and profiles

I am having a requirement to create account record when logged in as a user whose profile is not having create access to accounts.  And the controller which is being used by lightning component has been declared as without sharing. However I am still getting insufficient access error at the line where i am inserting new accounts. 
Now I am totally confused with the concept of without sharing which runs in system mode still looks for the profile level settings?? 
Some one please help me to resolve this issue.
Sainath VenkatSainath Venkat
Hello SR02,

Can you look into below link to know more about with sharing and without sharing.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm