LoginSignup
4
5

More than 3 years have passed since last update.

with sharing、without sharing、および inherited sharing キーワードの使用

Posted at

1.背景

Apex Class 定義する時は何も指定しないと、Default は「without sharing」で実行します。
例外は、executeAnonymous コールおよび Chatter in Apex はユーザコンテキスト(レコードの共有ルール採用)です。

2.with sharing

ユーザコンテキスト(レコードの共有ルール採用)

3.without sharing

システムコンテキスト(レコードの共有ルール無視)

4.inherited sharing

  • Default レコードの共有権限は「with sharing」となります。
  • 呼び出し側の権限を継承する

5.明記的な宣言なし

  • Default レコードの共有権限は「without sharing」です。
  • 呼び出し側の権限を継承する

Resource

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5