Example Scenarios
Refer to these sample restriction rules that fulfill different access requirements. To review how these example scenarios are built in Salesforce, see Restriction Rule Example Scenarios in Salesforce Help.
| Required Editions |
|---|
| Available in: Lightning Experience in Enterprise, Performance, Unlimited, and Developer Editions |
-
Allow Users to See Only Specified Record Type
This restriction rule allows the designated users to see only contracts that have a specified record type.
-
Allow Users to See Only Records That They Own
This restriction rule allows users with the designated profile to see only the tasks that they own.
-
Allow Users to See Only Records Owned by Same Role
This restriction rule allows active users to see only the events owned by users that have the same role. You can use dot notation to traverse object and field relationships in the
recordFilterfield. -
Allow Users to See Only Records Owned by Same Profile
This restriction rule allows active users to see only the events owned by users that have the same profile. You can use dot notation to traverse object and field relationships in the
recordFilterfield. -
Allow Users to See Records Based on a Custom Field
This restriction rule allows high-volume users to see only the contracts where the user’s department matches the contract’s department. This rule uses a custom field,
Department__c, that must have the appropriate value set through Apex, Process Builder, workflows, or flows. -
Allow Users to See an External Object’s Records
This restriction rule allows active Salesforce users to see the records of an external object called Purchase Order. The rule uses a field called IsClosed on Purchase Order records in its record criteria.
-
Provide User Access With Multiple String or ID Values in Record Criteria
This restriction rule allows active users to see records whose Name__c field matches the rule’s record criteria value. The record criteria contains strings separated by a comma. ID values are also supported. Double-quotes specify that the value inside the quotes isn’t considered a delimiter.
See Also