You need to sign in to do that
Don't have an account?
bhupal reddy 7
what will happen if one apex class is called in another apex class?
I have two classes ClassA and ClassB with WITH SHARING and WITHOUT SHARING keywords respectively.
Now what will happen if I call ClassB into ClassA?
On which context they finally Run Finally?
Now what will happen if I call ClassB into ClassA?
On which context they finally Run Finally?
From https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm , Inner classes do not inherit the sharing setting from their container class. Otherwise, the sharing setting applies to all code contained in the class, including initialization code, constructors, and methods.
See related post: https://salesforce.stackexchange.com/questions/25817/innerclasses-marked-as-without-sharing-outerclass-is-with-sharing
https://salesforce.stackexchange.com/questions/231495/sharing-rules-and-inner-classes
https://developer.salesforce.com/forums/?id=906F0000000Ba9DIAS
If this information helps, please mark the answer as best. Thank you