Step By Step Guide to Using Restriction Rules in Salesforce : asagarwal
by: asagarwal
blow post content copied from Ashish Agarwal – Independent Salesforce.com Architect & Blogger
click here to view original post
![Restriction Rules in Salesforce](https://amazon.asagarwal.com/images_2021/2021_11_16_restriction_rule_in_salesforce.png)
Traditionally, to control the visibility of records in Salesforce, we used to start with the most restrictive setting (i.e. setting OWD to Private for an object) and then opening up the access using various features like role hierarchy, sharing rules, teams etc.
Consider the following diagram. Before Restriction rules, we started with the most restrictive setting and then opened up access using various features.
![Before Restriction Rules in Salesforce](https://amazon.asagarwal.com/images_2021/2021_11_16_before_restriction_rule.png)
(Image Source: Restriction Rule Developer Guide)
But, now with Winter ’22 Release of Salesforce, we can also define a rule to restrict the visibility of records. For example, even if we have defined the OWD to Public Read or Public Read/Write on an object, we can now add restriction rules to hide certain records from certain users.
![After Restriction Rules in Salesforce](https://amazon.asagarwal.com/images_2021/2021_11_16_after_restriction_rule.png)
(Image Source: Restriction Rule Developer Guide)
So, What Are Restriction Rules?
Restriction Rules allow admin to restrict the visibility of selected records from selected group of users. It went GA (Generally Available) in Salesforce Winter ‘22 Release.
Which Objects are Supported for Restriction Rules?
As of now only the following objects are supported for Restriction Rules:
- Custom Objects
- Contracts
- Events
- Tasks
- Time Sheets
- Timesheet Entries
Where are Restriction Rules Applied?
Once defined, Restriction Rules are applied to the following Salesforce features:
- List Views
- Lookups
- Related Lists
- Reports
- Search
- SOQL
- SOSL
What are the Current Limitations & Considerations for Restriction Rules?
- Only two Restriction Rules can be created on the supported objects in Enterprise Edition & five in Unlimited & Performance Edition
- Only below data types are supported in the recordFilter and userCriteria fields:
- Boolean
- Date
- DateTime
- Double
- Int
- Reference
- String
- Time
- Restriction rules support only the EQUALS operator. The AND, OR, or any other operators aren’t supported.
- The use of formulas isn’t supported.
- You can use a change set to move restriction rules from one org to another.
- If you include IDs in your recordFilter or userCriteria fields that are specific to your Salesforce org (such as a role, record type, or profile ID), you must modify these IDs in the target org if different from the org where the restriction rules were originally created.
Ok, that’s enough talk. Now, let’s take a look at Restriction Rules in action in just under 10 minutes.
References & Useful URLs:
The post Step By Step Guide to Using Restriction Rules in Salesforce appeared first on Ashish Agarwal - Independent Salesforce.com Architect & Blogger.
November 16, 2021 at 03:30AM
Click here for more details...
=============================
The original post is available in Ashish Agarwal – Independent Salesforce.com Architect & Blogger by asagarwal
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================
![Salesforce Salesforce](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxyr0-tn0D8T8tDMbp_O89UlQ83Cuvk03CiOdvQtWP3XWmrDX-5bBbspYlHpwENo7DTEk-GK9QD6aod-pjThPRwxoEy0TDuuIRVqTr5eVnuFW1Mh581B6ohWxr6C9UuA3a9E3ot2SlNyw/s784/4.png)
Post a Comment