SlideShare a Scribd company logo
1 of 19
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

What's hot

Azure API Management 俺的マニュアル
Azure API Management 俺的マニュアルAzure API Management 俺的マニュアル
Azure API Management 俺的マニュアル貴志 上坂
 
Einstein Analyticsでのデータ取り込みと加工
Einstein Analyticsでのデータ取り込みと加工Einstein Analyticsでのデータ取り込みと加工
Einstein Analyticsでのデータ取り込みと加工Salesforce Developers Japan
 
Salesforceの開発についてちょっと詳しくなる
Salesforceの開発についてちょっと詳しくなるSalesforceの開発についてちょっと詳しくなる
Salesforceの開発についてちょっと詳しくなるJunko Nakayama
 
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメント
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメントSalesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメント
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメントSalesforce Developers Japan
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門Salesforce Developers Japan
 
Salesforceの標準オブジェクトについて復習してみた
Salesforceの標準オブジェクトについて復習してみたSalesforceの標準オブジェクトについて復習してみた
Salesforceの標準オブジェクトについて復習してみたy-maeda
 
認定Field Service Lightningコンサルタント 合格への第一歩
認定Field Service Lightningコンサルタント 合格への第一歩認定Field Service Lightningコンサルタント 合格への第一歩
認定Field Service Lightningコンサルタント 合格への第一歩Takahito Miyamoto
 
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えて
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えてEinstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えて
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えてSalesforce Developers Japan
 
Azure でサーバーレス、 Infrastructure as Code どうしてますか?
Azure でサーバーレス、 Infrastructure as Code どうしてますか?Azure でサーバーレス、 Infrastructure as Code どうしてますか?
Azure でサーバーレス、 Infrastructure as Code どうしてますか?Kazumi IWANAGA
 
Salesforce LDV(Large Data Volume) 20191018
Salesforce LDV(Large Data Volume) 20191018Salesforce LDV(Large Data Volume) 20191018
Salesforce LDV(Large Data Volume) 20191018Hiroki Iida
 
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてAzure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてShinya Yamaguchi
 
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~Yugo Shimizu
 
JIRA / Confluence の 必須プラグインはこれだ
JIRA / Confluence の必須プラグインはこれだJIRA / Confluence の必須プラグインはこれだ
JIRA / Confluence の 必須プラグインはこれだNarichika Kajihara
 
Lightning Knowledgeをちょっとだけ触ってみた
Lightning Knowledgeをちょっとだけ触ってみたLightning Knowledgeをちょっとだけ触ってみた
Lightning Knowledgeをちょっとだけ触ってみたy-maeda
 
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるGoのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるpospome
 
ApexトリガのBest Practiceを目指して
ApexトリガのBest Practiceを目指してApexトリガのBest Practiceを目指して
ApexトリガのBest Practiceを目指してTakahiro Yonei
 
Salesforceでの大規模データの取り扱い
Salesforceでの大規模データの取り扱いSalesforceでの大規模データの取り扱い
Salesforceでの大規模データの取り扱いSalesforce Developers Japan
 

What's hot (20)

Azure API Management 俺的マニュアル
Azure API Management 俺的マニュアルAzure API Management 俺的マニュアル
Azure API Management 俺的マニュアル
 
Visualforceを使ってみよう
Visualforceを使ってみようVisualforceを使ってみよう
Visualforceを使ってみよう
 
Salesforce 開発入門
Salesforce 開発入門Salesforce 開発入門
Salesforce 開発入門
 
Einstein Analyticsでのデータ取り込みと加工
Einstein Analyticsでのデータ取り込みと加工Einstein Analyticsでのデータ取り込みと加工
Einstein Analyticsでのデータ取り込みと加工
 
Salesforceの開発についてちょっと詳しくなる
Salesforceの開発についてちょっと詳しくなるSalesforceの開発についてちょっと詳しくなる
Salesforceの開発についてちょっと詳しくなる
 
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメント
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメントSalesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメント
Salesforce開発プロジェクトの進め方とアプリケーションライフサイクルマネジメント
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
 
RDF Semantic Graph「RDF 超入門」
RDF Semantic Graph「RDF 超入門」RDF Semantic Graph「RDF 超入門」
RDF Semantic Graph「RDF 超入門」
 
Salesforceの標準オブジェクトについて復習してみた
Salesforceの標準オブジェクトについて復習してみたSalesforceの標準オブジェクトについて復習してみた
Salesforceの標準オブジェクトについて復習してみた
 
認定Field Service Lightningコンサルタント 合格への第一歩
認定Field Service Lightningコンサルタント 合格への第一歩認定Field Service Lightningコンサルタント 合格への第一歩
認定Field Service Lightningコンサルタント 合格への第一歩
 
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えて
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えてEinstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えて
Einstein Analyticsによるユースケース別機能、実現例のご紹介(前編)〜Winter’18 新機能紹介を交えて
 
Azure でサーバーレス、 Infrastructure as Code どうしてますか?
Azure でサーバーレス、 Infrastructure as Code どうしてますか?Azure でサーバーレス、 Infrastructure as Code どうしてますか?
Azure でサーバーレス、 Infrastructure as Code どうしてますか?
 
Salesforce LDV(Large Data Volume) 20191018
Salesforce LDV(Large Data Volume) 20191018Salesforce LDV(Large Data Volume) 20191018
Salesforce LDV(Large Data Volume) 20191018
 
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてAzure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
 
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~
え!? Power BI の画面からデータ更新なんてできるの!? ~PowerApps カスタムビジュアルの可能性~
 
JIRA / Confluence の 必須プラグインはこれだ
JIRA / Confluence の必須プラグインはこれだJIRA / Confluence の必須プラグインはこれだ
JIRA / Confluence の 必須プラグインはこれだ
 
Lightning Knowledgeをちょっとだけ触ってみた
Lightning Knowledgeをちょっとだけ触ってみたLightning Knowledgeをちょっとだけ触ってみた
Lightning Knowledgeをちょっとだけ触ってみた
 
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるGoのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
 
ApexトリガのBest Practiceを目指して
ApexトリガのBest Practiceを目指してApexトリガのBest Practiceを目指して
ApexトリガのBest Practiceを目指して
 
Salesforceでの大規模データの取り扱い
Salesforceでの大規模データの取り扱いSalesforceでの大規模データの取り扱い
Salesforceでの大規模データの取り扱い
 

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

Salesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummarySalesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummaryAbhinav Gupta
 
Atlassian jira как полностью раскрыть возможности
Atlassian jira   как полностью раскрыть возможностиAtlassian jira   как полностью раскрыть возможности
Atlassian jira как полностью раскрыть возможностиAndrew Fadeev
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using GoCloudOps2005
 
Cairo meetup low code best practices
Cairo meetup low code best practicesCairo meetup low code best practices
Cairo meetup low code best practicesAhmed Keshk
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsAlfresco Software
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsSalesforce Developers
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Dev confus.2020 compliance operator
Dev confus.2020 compliance operatorDev confus.2020 compliance operator
Dev confus.2020 compliance operatorjaormx
 
Implementing Authorization
Implementing AuthorizationImplementing Authorization
Implementing AuthorizationTorin Sandall
 
Overview of vidhita_business_rules_composer
Overview of vidhita_business_rules_composerOverview of vidhita_business_rules_composer
Overview of vidhita_business_rules_composerOm Visvanathan
 
February 2020 Salesforce API Review
February 2020 Salesforce API ReviewFebruary 2020 Salesforce API Review
February 2020 Salesforce API ReviewLydon Bergin
 
Presentation Moss 2007 Usman
Presentation Moss 2007 UsmanPresentation Moss 2007 Usman
Presentation Moss 2007 UsmanUsman Zafar Malik
 
JBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionJBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionMauricio (Salaboy) Salatino
 
Summer '16 Realease notes
Summer '16 Realease notesSummer '16 Realease notes
Summer '16 Realease notesaggopal1011
 
Singapore Admin Group - 5 Free Admin Tools to Make Your Life Easier
Singapore Admin Group - 5 Free Admin Tools to Make Your Life EasierSingapore Admin Group - 5 Free Admin Tools to Make Your Life Easier
Singapore Admin Group - 5 Free Admin Tools to Make Your Life EasierJoey Chan
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Salesforce Developers
 
Secure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSecure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSalesforce Developers
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Peter Chittum
 

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

Salesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min SummarySalesforce restriction rules <2 min Summary
Salesforce restriction rules <2 min Summary
 
Atlassian jira как полностью раскрыть возможности
Atlassian jira   как полностью раскрыть возможностиAtlassian jira   как полностью раскрыть возможности
Atlassian jira как полностью раскрыть возможности
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
Cairo meetup low code best practices
Cairo meetup low code best practicesCairo meetup low code best practices
Cairo meetup low code best practices
 
Opa in the api management world
Opa in the api management worldOpa in the api management world
Opa in the api management world
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension Points
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Dev confus.2020 compliance operator
Dev confus.2020 compliance operatorDev confus.2020 compliance operator
Dev confus.2020 compliance operator
 
Implementing Authorization
Implementing AuthorizationImplementing Authorization
Implementing Authorization
 
Overview of vidhita_business_rules_composer
Overview of vidhita_business_rules_composerOverview of vidhita_business_rules_composer
Overview of vidhita_business_rules_composer
 
February 2020 Salesforce API Review
February 2020 Salesforce API ReviewFebruary 2020 Salesforce API Review
February 2020 Salesforce API Review
 
Presentation Moss 2007 Usman
Presentation Moss 2007 UsmanPresentation Moss 2007 Usman
Presentation Moss 2007 Usman
 
JBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionJBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 Introduction
 
Summer '16 Realease notes
Summer '16 Realease notesSummer '16 Realease notes
Summer '16 Realease notes
 
Singapore Admin Group - 5 Free Admin Tools to Make Your Life Easier
Singapore Admin Group - 5 Free Admin Tools to Make Your Life EasierSingapore Admin Group - 5 Free Admin Tools to Make Your Life Easier
Singapore Admin Group - 5 Free Admin Tools to Make Your Life Easier
 
Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2Coding Apps in the Cloud with Force.com - Part 2
Coding Apps in the Cloud with Force.com - Part 2
 
Secure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSecure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and Sharing
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
 

More from Takashi Hatamoto

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

More from Takashi Hatamoto (9)

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

Recently uploaded

✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goahorny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goasexy call girls service in goa
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 

Recently uploaded (20)

✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goahorny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 

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