SlideShare a Scribd company logo
Takashi Hatamoto
Restriction Rules(制限ルール)
調べてみた
Summer’21新機能に関する調査と考察
SFDG 運営サブリーダー
自己紹介
はたもと たかし
畑本 貴史
株式会社チームスピリット エンジニア
TSFチーム(製品開発)
こんな感じ
• Salesforceひとすじ早10年
• AIアプリコンテスト2018 優勝チーム(ロボホンズ)
• Salesforce Developer Group Tokyo 運営
Summer’21新機能の中でこんなものが
Control Access to Sensitive
Records with Restriction Rules
(Now in Beta)
https://developer.salesforce.com/
blogs/2021/05/control-access-to-
sensitive-records-with-restriction-
rules-now-in-beta.html
→ Restriction Rules(制限ルー
ル)による機密レコードへのアク
セス制御
Summer’21新機能の中でこんなものが
Control Access to Sensitive
Records with Restriction Rules
(Now in Beta)
https://developer.salesforce.com/
blogs/2021/05/control-access-to-
sensitive-records-with-restriction-
rules-now-in-beta.html
→ Restriction Rules(制限ルー
ル)による機密レコードへのアク
セス制御
組織の標準設定 +
追加の共有
(共有ルール、手動共有)
左記の設定 -
制限ルール
Summer’21新機能の中でこんなものが
Control Access to Sensitive
Records with Restriction Rules
(Now in Beta)
https://developer.salesforce.com/
blogs/2021/05/control-access-to-
sensitive-records-with-restriction-
rules-now-in-beta.html
→ Restriction Rules(制限ルー
ル)による機密レコードへのアク
セス制御
組織の標準設定 +
追加の共有
(共有ルール、手動共有)
左記の設定 -
制限ルール
可視性の
「引き算」が
できる!?
もう少し調べてみた
Without restriction rules, users who have access to an account can see its contracts, tasks, and events,
even when the organization-wide default is set to Private. For custom objects, users can see all of their
child records. Restriction rules allow you to define which users see which records in Lightning
Experience for custom objects, contracts, tasks, and events and configure truly “Private” access for
these objects. Creating, editing, and deleting restriction rules are only available via the Tooling and
Metadata APIs.
もう少し調べてみた
Without restriction rules, users who have access to an account can see its contracts, tasks, and events,
even when the organization-wide default is set to Private. For custom objects, users can see all of their
child records. Restriction rules allow you to define which users see which records in Lightning
Experience for custom objects, contracts, tasks, and events and configure truly “Private” access for
these objects. Creating, editing, and deleting restriction rules are only available via the Tooling and
Metadata APIs.
• 適用できるオブジェクト
• Contract(契約)、task(ToDo)、event(行動)
• カスタムオブジェクト
• 組織のデフォルト共有設定が「非公開」であっても、これらのオブジェクトが子レコードになってい
る場合は無制限に参照可能になってしまう。
• →子レコードの中でも更に詳細な閲覧制限を実現したい場合に使用する
• 登録/更新/削除は以下の経路で行う
• Tooling API
• Metadata API
設定方法①:Tooling API
Tooling API:JSON形式で定義を作成
→Tooling APIエンドポイントにPOSTで送る /services/data/v52.0/tooling/sobjects/RestrictionRule
{
"FullName":"restictionruleeventsrole",
"Metadata": {
"active":true,
"description":"Allows active users to see only events owned by users of the same role.",
"enforcementType":"Restrict",
"masterLabel":"Events Owned by Same Role",
"recordFilter": "Owner.RoleId = $User.UserRoleId",
"targetEntity":"Event",
"userCriteria":"$User.IsActive = true",
"version":1
}
}
設定方法②:Metadata API
Metadata API:XML形式で定義ファイルを作成
<?xml version="1.0" encoding="UTF-8"?>
<RestrictionRule xmlns="http://soap.sforce.com/2006/04/metadata">
<active>true</active>
<description>Sales team can see only task records with specified record type</description>
<enforcementType>Restrict</enforcementType>
<masterLabel>Sales Team Record Type</masterLabel>
<recordFilter>recordTypeId = '011xxxxxxxxxxxx'</recordFilter>
<targetEntity>Task</targetEntity>
<userCriteria>$User.ProfileId = '00exxxxxxxxxxxx'</userCriteria>
<version>1</version>
</RestrictionRule>
→package.xmlとともにデプロイ
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>restrictionRules</members>
<name>RestrictionRule</name>
</types>
<version>52.0</version>
</Package>
定義ファイルの内容について
属性の一覧
Tooling API属性 Metadata API属性 内容
Description description ルールの説明文 (任意入力)
DeveloperName XMLファイル名 ルールの物理名(組織内で一意)
EnforcementType enforcementType 「Restrict」を指定 (将来のための予約?)
他は「FieldRestrict」「Scoping」があるが使用不可
FullName XMLファイル名 Metadataファイルの名称
IsActive active 有効/無効フラグ
Language なし? 対象言語を指定(?)
MasterLabel masterLabel ルールの論理名
Metadata XMLファイル? メタデータxmlを直接指定?
RecordFilter recordFilter 表示レコードの検索条件
TargetEntity targetEntity 対象オブジェクト
・契約、活動(ToDo、行動)
・カスタムオブジェクト
UserCriteria userCriteria 対象ユーザの指定条件
Version version ルールのバージョン番号
想定されるユースケースとサンプル①
• Allow Users to See Only Specified Record Type
特定のレコードタイプのみ表示される
• recordFilter:RecordTypeId = ‘012xxxxxxxxxxxx’ (レコードタイプID)
• userCriteria:$User.RoleId = ‘00exxxxxxxxxxxx‘ (ユーザのロールID)
• Allow Users to See Only Records That They Own
所有者が自分であるレコードのみ表示される
• recordFilter:OwnerId = $User.Id (所有者のID = ユーザID)
• userCriteria:$User.ProfileId = ‘005xxxxxxxxxxxx’ (ユーザのプロファイルID)
• Allow Users to See Only Records Owned by Same Role
自分と同じロールの人が所有するレコードのみ表示される
• recordFilter:Owner.RoleId = $User.UserRoleId
(所有者のロールID = ユーザのロールID)
• userCriteria:$User.IsActive = true
(有効ユーザすべて)
想定されるユースケースとサンプル②
• Allow Users to See Only Records Owned by Same Profile
自分と同じプロファイルの人が所有するレコードのみ表示される
• recordFilter:Owner.ProfileId = $User.ProfileId
(所有者のプロファイルID = ユーザのプロファイルID)
• userCriteria:$User.IsActive = true
(有効ユーザすべて)
• Allow Users to See Records Based on a Custom Field
カスタム項目の値を使った制御
• recordFilter:Department__c = $User.Department
(項目:Department__cの値 = ユーザの部署)
• userCriteria:$User.UserType = ‘CSPLitePortal’
(ユーザライセンスが「CSP Lite Portal」)
詳細仕様
• recordFilter の仕様
• レコードが持つ項目に対し条件指定できる ※参照関係の1階層先まで辿れる
• 比較対象にユーザ項目を指定可能
• 条件は1つのみ(And/Orは不可)
• userCriteria の仕様
• ユーザ項目に対し条件指定できる
• 条件は1つのみ(And/Orは不可)
• Restriction Rule の仕様
• 組織のエディションによって上限が異なる
• EnterPrise、Developer:1オブジェクトあたり2個
• Performance、Unlimited: 1オブジェクトあたり5個
• その中で、同一ユーザに対して指定できるルールは1個
• 同一ユーザを巻き込まないルール設計が必要
• システム管理者の操作、システムコンテキスト処理(Apex、フロー)には影響しない
まとめ:Restriction Ruleと共有ルールの違い
比較要素 Restriction Rule 共有ルール 直接共有
対象 契約、ToDo、行動
カスタムオブジェクト
所有者のあるレコード
(主従関係の子レコードを除く)
前提条件 なし 組織のデフォルト設定が「非公開」「参照の
み」
対象レコード指
定
クエリ構文で指定
・レコードの項目
選択リストで指定
・所有者の所属ロー
ル、公開グループ
・ユーザの項目
ID直接指定
(共有設定の分だけ
レコード登録)
対象ユーザ指
定
クエリ構文で指定
・ユーザの項目
・ロール
・プロファイル
選択リストで指定
・所有者の所属ロー
ル、公開グループ
・ユーザID直接指定
・ロール
・公開グループ
効果 ・条件を満たすレコー
ドのみにアクセスでき
る
・条件を満たさない場
合、共有設定に関わ
らずアクセスできない
・条件を満たすレコードにアクセスできる
・複数の共有ルールのいずれか、あるいは直
接共有されていれば参照・編集権限を持つ
さっそく設定してみた・・・
• Metadata APIでデプロイ
さっそく設定してみた・・・!?
• Metadata APIでデプロイ
さっそく設定してみた・・・!?
• Metadata APIでデプロイ
現在はSandboxでしか使えないそうです😥
(Salesforce サポートから有効化依頼)
参考資料
• Salesforce Developer Blog
• 紹介記事
• https://developer.salesforce.com/blogs/2021/05/control-access-to-sensitive-records-with-restriction-
rules-now-in-beta.html
• Restriction Rules Developer Guide (Beta)
• Restriction Rulesのリファレンス
• https://developer.salesforce.com/docs/atlas.en-
us.restriction_rules.meta/restriction_rules/meta_restrictionrule.htm
• Trailblazer Communityグループ:Restriction Rules Beta
• ベータ参加ユーザ向けのグループ
• https://trailhead.salesforce.com/ja/trailblazer-community/groups/0F94S000000Gwle#discussion
Restriction Rules(制限ルール)調べてみた

More Related Content

PPTX
Salesforce integration architecture 20200529
PDF
認定テクニカルアーキテクト取ろうぜ
PDF
認定 Integration Architecture デザイナー試験を復習してみた
PPTX
SalesforceにおけるCDC(変更データキャプチャ)の実装・活用法について
PDF
はじめようLightningコンポーネント
PDF
Lightning コンポーネント開発〜実装例から学ぶ開発のコツ
PDF
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
PDF
データ連携の新しいカタチ - 変更データキャプチャ/プラットフォームイベントを MuleSoft Anypoint Platform と組み合わせて試してみよう
Salesforce integration architecture 20200529
認定テクニカルアーキテクト取ろうぜ
認定 Integration Architecture デザイナー試験を復習してみた
SalesforceにおけるCDC(変更データキャプチャ)の実装・活用法について
はじめようLightningコンポーネント
Lightning コンポーネント開発〜実装例から学ぶ開発のコツ
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
データ連携の新しいカタチ - 変更データキャプチャ/プラットフォームイベントを MuleSoft Anypoint Platform と組み合わせて試してみよう

What's hot (20)

PPTX
Salesforceの標準オブジェクトについて復習してみた
PPTX
Salesforce開発で気を付けたいポイント
PDF
データローダについてちょっと詳しくなる
PDF
Salesforce LDV(Large Data Volume) 20191018
PDF
Introduction to External Objects and the OData Connector
PDF
SharePoint Online モダンサイトの設計 - SharePoint の利用計画 - #‎MSInteract19‬ #PR05
PDF
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
PPTX
Apexトリガと標準自動化プロセスの違い
PDF
Salesforce Big Object 最前線
PPTX
Lightning Knowledgeをちょっとだけ触ってみた
PDF
Salesforceの開発についてちょっと詳しくなる
PDF
Salesforceのサイトゲストユーザについて
PDF
Re: ゼロから始める監視設計
PDF
知っておきたいFirebase の色んな上限について
PDF
IDaaS を正しく活用するための認証基盤設計 ~Azure Active Directory の構成パターン詳細~
PDF
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
PDF
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
PDF
Monitoring - 入門監視
PPTX
Keycloakの実際・翻訳プロジェクト紹介
PDF
SharePoint 開発でできること 2019年9月版
Salesforceの標準オブジェクトについて復習してみた
Salesforce開発で気を付けたいポイント
データローダについてちょっと詳しくなる
Salesforce LDV(Large Data Volume) 20191018
Introduction to External Objects and the OData Connector
SharePoint Online モダンサイトの設計 - SharePoint の利用計画 - #‎MSInteract19‬ #PR05
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
Apexトリガと標準自動化プロセスの違い
Salesforce Big Object 最前線
Lightning Knowledgeをちょっとだけ触ってみた
Salesforceの開発についてちょっと詳しくなる
Salesforceのサイトゲストユーザについて
Re: ゼロから始める監視設計
知っておきたいFirebase の色んな上限について
IDaaS を正しく活用するための認証基盤設計 ~Azure Active Directory の構成パターン詳細~
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
Monitoring - 入門監視
Keycloakの実際・翻訳プロジェクト紹介
SharePoint 開発でできること 2019年9月版
Ad

More from Takashi Hatamoto (9)

PDF
20240125_SFDG Meetup32寄稿資料_TDX2024に行こう!(TrailblazerDX)
PDF
20240125_SFDG Meetup32寄稿_訳あってLWCから添付ファイル上げようとした話
PPTX
20231212_【オンライン開催】SWTT 2023秋 振り返り会 for Arch-寄稿
PPTX
20230830_ArchitectGroup_SWTT再演(GraphQL)
PPTX
20230424_TDXGG寄稿記事:同期/非同期アーキテクチャの比較
PPTX
20221104_しゃべくりforceのおしゃべり用資料
PPTX
DreamTXセッションから読み解くAI活用の現状と展望
PPTX
LEXモバイルから紐解くSalesforceモバイル史
PPTX
Adminとうまく共存するためのApex開発Tips
20240125_SFDG Meetup32寄稿資料_TDX2024に行こう!(TrailblazerDX)
20240125_SFDG Meetup32寄稿_訳あってLWCから添付ファイル上げようとした話
20231212_【オンライン開催】SWTT 2023秋 振り返り会 for Arch-寄稿
20230830_ArchitectGroup_SWTT再演(GraphQL)
20230424_TDXGG寄稿記事:同期/非同期アーキテクチャの比較
20221104_しゃべくりforceのおしゃべり用資料
DreamTXセッションから読み解くAI活用の現状と展望
LEXモバイルから紐解くSalesforceモバイル史
Adminとうまく共存するためのApex開発Tips
Ad

Recently uploaded (20)

PPTX
Database Information System - Management Information System
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
Internet___Basics___Styled_ presentation
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
Digital Literacy And Online Safety on internet
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
newyork.pptxirantrafgshenepalchinachinane
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
E -tech empowerment technologies PowerPoint
PPT
Ethics in Information System - Management Information System
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
artificial intelligence overview of it and more
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
Introduction to cybersecurity and digital nettiquette
Database Information System - Management Information System
artificialintelligenceai1-copy-210604123353.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
An introduction to the IFRS (ISSB) Stndards.pdf
Internet___Basics___Styled_ presentation
presentation_pfe-universite-molay-seltan.pptx
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Digital Literacy And Online Safety on internet
Module 1 - Cyber Law and Ethics 101.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
newyork.pptxirantrafgshenepalchinachinane
Sims 4 Historia para lo sims 4 para jugar
E -tech empowerment technologies PowerPoint
Ethics in Information System - Management Information System
Slides PPTX World Game (s) Eco Economic Epochs.pptx
artificial intelligence overview of it and more
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Job_Card_System_Styled_lorem_ipsum_.pptx
Introduction to cybersecurity and digital nettiquette

Restriction Rules(制限ルール) 調べてみた

  • 2. 自己紹介 はたもと たかし 畑本 貴史 株式会社チームスピリット エンジニア TSFチーム(製品開発) こんな感じ • Salesforceひとすじ早10年 • AIアプリコンテスト2018 優勝チーム(ロボホンズ) • Salesforce Developer Group Tokyo 運営
  • 3. Summer’21新機能の中でこんなものが Control Access to Sensitive Records with Restriction Rules (Now in Beta) https://developer.salesforce.com/ blogs/2021/05/control-access-to- sensitive-records-with-restriction- rules-now-in-beta.html → Restriction Rules(制限ルー ル)による機密レコードへのアク セス制御
  • 4. Summer’21新機能の中でこんなものが Control Access to Sensitive Records with Restriction Rules (Now in Beta) https://developer.salesforce.com/ blogs/2021/05/control-access-to- sensitive-records-with-restriction- rules-now-in-beta.html → Restriction Rules(制限ルー ル)による機密レコードへのアク セス制御 組織の標準設定 + 追加の共有 (共有ルール、手動共有) 左記の設定 - 制限ルール
  • 5. Summer’21新機能の中でこんなものが Control Access to Sensitive Records with Restriction Rules (Now in Beta) https://developer.salesforce.com/ blogs/2021/05/control-access-to- sensitive-records-with-restriction- rules-now-in-beta.html → Restriction Rules(制限ルー ル)による機密レコードへのアク セス制御 組織の標準設定 + 追加の共有 (共有ルール、手動共有) 左記の設定 - 制限ルール 可視性の 「引き算」が できる!?
  • 6. もう少し調べてみた Without restriction rules, users who have access to an account can see its contracts, tasks, and events, even when the organization-wide default is set to Private. For custom objects, users can see all of their child records. Restriction rules allow you to define which users see which records in Lightning Experience for custom objects, contracts, tasks, and events and configure truly “Private” access for these objects. Creating, editing, and deleting restriction rules are only available via the Tooling and Metadata APIs.
  • 7. もう少し調べてみた Without restriction rules, users who have access to an account can see its contracts, tasks, and events, even when the organization-wide default is set to Private. For custom objects, users can see all of their child records. Restriction rules allow you to define which users see which records in Lightning Experience for custom objects, contracts, tasks, and events and configure truly “Private” access for these objects. Creating, editing, and deleting restriction rules are only available via the Tooling and Metadata APIs. • 適用できるオブジェクト • Contract(契約)、task(ToDo)、event(行動) • カスタムオブジェクト • 組織のデフォルト共有設定が「非公開」であっても、これらのオブジェクトが子レコードになってい る場合は無制限に参照可能になってしまう。 • →子レコードの中でも更に詳細な閲覧制限を実現したい場合に使用する • 登録/更新/削除は以下の経路で行う • Tooling API • Metadata API
  • 8. 設定方法①:Tooling API Tooling API:JSON形式で定義を作成 →Tooling APIエンドポイントにPOSTで送る /services/data/v52.0/tooling/sobjects/RestrictionRule { "FullName":"restictionruleeventsrole", "Metadata": { "active":true, "description":"Allows active users to see only events owned by users of the same role.", "enforcementType":"Restrict", "masterLabel":"Events Owned by Same Role", "recordFilter": "Owner.RoleId = $User.UserRoleId", "targetEntity":"Event", "userCriteria":"$User.IsActive = true", "version":1 } }
  • 9. 設定方法②:Metadata API Metadata API:XML形式で定義ファイルを作成 <?xml version="1.0" encoding="UTF-8"?> <RestrictionRule xmlns="http://soap.sforce.com/2006/04/metadata"> <active>true</active> <description>Sales team can see only task records with specified record type</description> <enforcementType>Restrict</enforcementType> <masterLabel>Sales Team Record Type</masterLabel> <recordFilter>recordTypeId = '011xxxxxxxxxxxx'</recordFilter> <targetEntity>Task</targetEntity> <userCriteria>$User.ProfileId = '00exxxxxxxxxxxx'</userCriteria> <version>1</version> </RestrictionRule> →package.xmlとともにデプロイ <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>restrictionRules</members> <name>RestrictionRule</name> </types> <version>52.0</version> </Package>
  • 10. 定義ファイルの内容について 属性の一覧 Tooling API属性 Metadata API属性 内容 Description description ルールの説明文 (任意入力) DeveloperName XMLファイル名 ルールの物理名(組織内で一意) EnforcementType enforcementType 「Restrict」を指定 (将来のための予約?) 他は「FieldRestrict」「Scoping」があるが使用不可 FullName XMLファイル名 Metadataファイルの名称 IsActive active 有効/無効フラグ Language なし? 対象言語を指定(?) MasterLabel masterLabel ルールの論理名 Metadata XMLファイル? メタデータxmlを直接指定? RecordFilter recordFilter 表示レコードの検索条件 TargetEntity targetEntity 対象オブジェクト ・契約、活動(ToDo、行動) ・カスタムオブジェクト UserCriteria userCriteria 対象ユーザの指定条件 Version version ルールのバージョン番号
  • 11. 想定されるユースケースとサンプル① • Allow Users to See Only Specified Record Type 特定のレコードタイプのみ表示される • recordFilter:RecordTypeId = ‘012xxxxxxxxxxxx’ (レコードタイプID) • userCriteria:$User.RoleId = ‘00exxxxxxxxxxxx‘ (ユーザのロールID) • Allow Users to See Only Records That They Own 所有者が自分であるレコードのみ表示される • recordFilter:OwnerId = $User.Id (所有者のID = ユーザID) • userCriteria:$User.ProfileId = ‘005xxxxxxxxxxxx’ (ユーザのプロファイルID) • Allow Users to See Only Records Owned by Same Role 自分と同じロールの人が所有するレコードのみ表示される • recordFilter:Owner.RoleId = $User.UserRoleId (所有者のロールID = ユーザのロールID) • userCriteria:$User.IsActive = true (有効ユーザすべて)
  • 12. 想定されるユースケースとサンプル② • Allow Users to See Only Records Owned by Same Profile 自分と同じプロファイルの人が所有するレコードのみ表示される • recordFilter:Owner.ProfileId = $User.ProfileId (所有者のプロファイルID = ユーザのプロファイルID) • userCriteria:$User.IsActive = true (有効ユーザすべて) • Allow Users to See Records Based on a Custom Field カスタム項目の値を使った制御 • recordFilter:Department__c = $User.Department (項目:Department__cの値 = ユーザの部署) • userCriteria:$User.UserType = ‘CSPLitePortal’ (ユーザライセンスが「CSP Lite Portal」)
  • 13. 詳細仕様 • recordFilter の仕様 • レコードが持つ項目に対し条件指定できる ※参照関係の1階層先まで辿れる • 比較対象にユーザ項目を指定可能 • 条件は1つのみ(And/Orは不可) • userCriteria の仕様 • ユーザ項目に対し条件指定できる • 条件は1つのみ(And/Orは不可) • Restriction Rule の仕様 • 組織のエディションによって上限が異なる • EnterPrise、Developer:1オブジェクトあたり2個 • Performance、Unlimited: 1オブジェクトあたり5個 • その中で、同一ユーザに対して指定できるルールは1個 • 同一ユーザを巻き込まないルール設計が必要 • システム管理者の操作、システムコンテキスト処理(Apex、フロー)には影響しない
  • 14. まとめ:Restriction Ruleと共有ルールの違い 比較要素 Restriction Rule 共有ルール 直接共有 対象 契約、ToDo、行動 カスタムオブジェクト 所有者のあるレコード (主従関係の子レコードを除く) 前提条件 なし 組織のデフォルト設定が「非公開」「参照の み」 対象レコード指 定 クエリ構文で指定 ・レコードの項目 選択リストで指定 ・所有者の所属ロー ル、公開グループ ・ユーザの項目 ID直接指定 (共有設定の分だけ レコード登録) 対象ユーザ指 定 クエリ構文で指定 ・ユーザの項目 ・ロール ・プロファイル 選択リストで指定 ・所有者の所属ロー ル、公開グループ ・ユーザID直接指定 ・ロール ・公開グループ 効果 ・条件を満たすレコー ドのみにアクセスでき る ・条件を満たさない場 合、共有設定に関わ らずアクセスできない ・条件を満たすレコードにアクセスできる ・複数の共有ルールのいずれか、あるいは直 接共有されていれば参照・編集権限を持つ
  • 18. 参考資料 • Salesforce Developer Blog • 紹介記事 • https://developer.salesforce.com/blogs/2021/05/control-access-to-sensitive-records-with-restriction- rules-now-in-beta.html • Restriction Rules Developer Guide (Beta) • Restriction Rulesのリファレンス • https://developer.salesforce.com/docs/atlas.en- us.restriction_rules.meta/restriction_rules/meta_restrictionrule.htm • Trailblazer Communityグループ:Restriction Rules Beta • ベータ参加ユーザ向けのグループ • https://trailhead.salesforce.com/ja/trailblazer-community/groups/0F94S000000Gwle#discussion