Restriction Rules Developer Guide
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Restriction Rules
Considerations
Allow Users to See Only Specified Record Type
Allow Users to See Only Records That They Own
Allow Users to See Only Records Owned by Same Role
Allow Users to See Only Records Owned by Same Profile
Allow Users to See Records Based on a Custom Field
Allow Users to See an External Object's Records
Provide User Access With Multiple String or ID Values in Record Criteria
Newer Version Available
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.
| 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 recordFilter field. -
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 recordFilter field. -
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.