About Us

Are you looking for Salesforce Consulting Services? As Salesforce Implementation Partner, We provide services of · Salesforce Communities Cloud · Marketing Cloud · Idea to AppExchange Listing · APIs and Integrations · Gorgeous UX · Solution/Security/AppExchange Review · Salesforce Custom Development · Salesforce Mobile Solutions, And so much more!!

Working Hours

🕒 Monday to Friday: 9 AM – 10 PM IST

Salesforce Inherited Sharing - How it really works?

Salesforce “Inherited Sharing”, explained!

Salesforce “Inherited Sharing” is a newly introduced modifier for class declaration. It’s surely better than Apex classes with no sharing declaration, as it mostly enforces WITH SHARING context, the official documentation screenshot describes Aura, VF, and Apex REST to auto enforce WITH SHARING context. But it’s ambiguous about

Any other entry point to an Apex transaction
Inherited Sharing

Inherited Sharing Experiments (Video Walk-through)

The following video demonstrates INHERITED SHARING’s impact in various contexts i.e. Aura, Batch, Inbound Email Handler, Scheduler, Trigger, Invocable Actions, Apex REST Service.

Following is summary of my findings, please note the Apex Trigger context is the exception.

ContextInherited Sharing Implication
Inbound Email HandlerWITH SHARING
Scheduled ApexWITH SHARING
Invocable ActionsWITH SHARING
Inherited sharing implications from various Apex Entry points


Please be alarmed when using INHERITED SHARING with TRIGGER as Apex Entry point. As that’s the only situation where it acts in WITHOUT SHARING mode. Hopefully, this is the correct approach for Triggers, as they need to see more than usually visible data, i.e. beyond the sharing rules for a given user.

There is a similar expectation with Invocable Actions, as they are used in Process Builder to coverup complex business logic requirements. But they are executed in WITH SHARING mode. Same goes with Batch/Scheduled apex, its meant to see all data beyond usual sharing rules, but it’s working in WITH SHARING mode. Thus, be cautious and use correct INHERITED, WITH or WITHOUT sharing mode on Invocable, Batch, and Scheduled Apex.

Abhinav Gupta

Subscribe to our newsletter

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Concretio Apps will use the information you provide on this form to be in touch with you and to provide updates and marketing.