tag:blogger.com,1999:blog-8457518975744463615.post7374807268688724739..comments2024-03-28T00:17:21.011-07:00Comments on SFDC Kid: APEX ACCESS MODIFIERS - With Sharing • Without SharingAJINKYA DHAS http://www.blogger.com/profile/13223328981950114267noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8457518975744463615.post-20000102412679561852022-02-15T03:35:36.620-08:002022-02-15T03:35:36.620-08:00Nice explanation
However, Example 5 of the article...Nice explanation<br />However, Example 5 of the article is wrong, i have tried by running the code itself.<br /><br />if outer is without sharing<br />and inner is with sharing<br /><br />then outer will run in without sharing mode and will return all the records.<br />and inner will run in with sharing mode and will return the records which the user has access toJasneet Duahttps://www.linkedin.com/in/jasneetdua/noreply@blogger.comtag:blogger.com,1999:blog-8457518975744463615.post-84658616151491010462021-11-22T15:08:26.223-08:002021-11-22T15:08:26.223-08:00"If you declare a class as a Without Sharing ..."If you declare a class as a Without Sharing then this apex class runs in system mode which means apex code has access to all the objects and fields irrespective of current users sharing rules, fields level security, object permissions." This statement is partially wrong. Without sharing keyword has no effect on "access to all the objects and fields".. Sharing keyword on controls record access..Manishhttps://www.blogger.com/profile/00411674020735048446noreply@blogger.comtag:blogger.com,1999:blog-8457518975744463615.post-83455729381350721772020-03-08T00:18:57.518-08:002020-03-08T00:18:57.518-08:00Hi jdkgabri,
You are absolutely correct, Inherite...Hi jdkgabri,<br /><br />You are absolutely correct, Inherited sharing is the default used keyword so that system can run in sharing mode 😊<br /><br />Thanks, Happy Learning #salesforceKidAJINKYA DHAS https://www.blogger.com/profile/13223328981950114267noreply@blogger.comtag:blogger.com,1999:blog-8457518975744463615.post-75598996846778580812020-03-06T03:38:16.126-08:002020-03-06T03:38:16.126-08:00What about the inherited sharing? I would say that...What about the inherited sharing? I would say that is the default used keyword when it is not specified.jdkgabrihttps://www.blogger.com/profile/02973979838765593946noreply@blogger.com