Skip to main content

Timeline for Sharing rules and Inner classes

Current License: CC BY-SA 4.0

6 events
when toggle format what by license comment
Jun 15, 2020 at 8:11 history edited CommunityBot
Commonmark migration
Sep 6, 2018 at 15:51 comment added David Reed @Mguy, lack of a sharing declaration at the "top" of the call sequence is equivalent to without sharing. The unpredictability you might see is when code without a sharing declaration is called by multiple classes with different sharing declarations, which will result in different results based on the caller. The inherited sharing declaration Ranga pointed to helps establish safer, more predictable defaults.
Sep 6, 2018 at 15:44 comment added Ranga To add more, after winter 19 release you can declare inner class as inherited sharing to avoid confusion. releasenotes.docs.salesforce.com/en-us/winter19/release-notes/…
Sep 6, 2018 at 15:44 comment added M guy If for example class a was also not defined with the sharing keyword, does that mean it would just run in the system context? Or does the behaviour become unpredictable? Edit: say it was NOT called from chatter or execute anonymous
Sep 6, 2018 at 15:38 vote accept M guy
Sep 6, 2018 at 15:37 history answered David Reed CC BY-SA 4.0