what is difference between with sharing and without sharing in salesforce?

Class with sharing and without sharing in Salesforce. With Sharing - Enforce the sharing rules that apply to current user. Without Sharing - Doesn't enforce the sharing rules. ... This means that if the class is called by a class that has sharing enforced, then sharing is enforced for the called class.

 

With Sharing -实施共享规则适用于当前用户。

Without Sharing - 不执行共享规则。 ...这意味着如果该类由已共享的类调用,则对被调用的类强制共享。

1.我先找到account sharing setting

【Salesforce】【Developer】 Apex study --difference between with sharing and without sharing

2.给account 设定一个共享规则。这里设置的是内部用户的record可以以只读的方式共享给CEO。

【Salesforce】【Developer】 Apex study --difference between with sharing and without sharing

3.写一个类适用共享规则。应该是CEO可以看到你写的类。

【Salesforce】【Developer】 Apex study --difference between with sharing and without sharing

初学Salesforce,以上只是个人理解,有不对,请指教。

相关文章:

  • 2021-09-11
  • 2022-01-14
  • 2021-09-02
  • 2021-06-03
  • 2021-04-21
  • 2020-02-09
  • 2021-11-18
  • 2021-10-28
猜你喜欢
  • 2021-06-29
  • 2021-11-04
  • 2022-01-30
  • 2021-07-19
  • 2021-12-10
  • 2022-01-02
  • 2021-06-04
相关资源
相似解决方案