Salesforce Security Restriction Rules and Scoping Rules (in English)
Updated 2026-11-26
What's changed since the video
Each change is dated and checked against Salesforce's own documentation.
- More objects than in the video. The video lists custom objects, external objects, contracts, tasks and events. Today: "Restriction rules are available only for custom objects, external objects, quotes, contracts, events, tasks, time sheets, and time sheet entries" (Restriction Rules, same page). Still not accounts, cases or opportunities.
- "New" in 2023. Not a platform change: the video calls these new. They're established features now.
- Two things go straight past a restriction rule. Not in the video: "Restriction rules aren't applied for code executed in System Mode," and "Users with the View All Records or View All Data permissions can view all records regardless of restriction rules" (Restriction Rule Considerations, Salesforce Help, checked 2026-11-26).
- Master-detail: yes, on the detail object. At the end of the video I say I'd heard they may work on master-detail relationships and that I'd test it. A rule on the parent doesn't reach its children: "Creating a restriction rule for an object doesn't automatically restrict access to its child objects… To secure these child objects, you must use other sharing mechanisms" (Restriction Rule Considerations, Salesforce Help, checked 2026-11-26). But a restriction rule on a custom detail object itself, with the criteria on the child's own fields, does filter the children, which no other sharing tool can do for a detail object. Chapter 16, module 1 shows how, in "Where restriction rules shine."
- More objects for scoping rules too. The video lists custom objects, accounts and cases. Today scoping rules are available for custom objects, accounts, cases, contacts, events, leads, opportunities and tasks, in Performance, Unlimited and Developer editions, not Enterprise (Scoping Rules, Salesforce Help, checked 2026-11-26).
Still right
- Restriction rules are strict, scoping rules are soft. A restriction rule is a final narrowing filter on top of all the sharing; a scoping rule sets what list views and reports show, and the user can switch it off.
- Each rule has a filter on the user, from a field or a permission, and a filter on the record.
- The limits: "up to two active restriction rules per object in Enterprise and Developer editions and up to five active restriction rules per object in Performance and Unlimited editions" (Restriction Rules, Salesforce Help, checked 2026-11-26).
- Only one rule should ever apply to a user: "If you create two active rules, and both rules apply to a given user, only one of the active rules is observed," and you don't choose which (same page).
- External objects can have restriction rules, on the OData and cross-org adapters, and Salesforce recommends turning off search for them.
- A soft-delete flag with a restriction rule can hide records from everyone except the admins.
All videos in this series: ארכיטקטורת אבטחה
סרטון נטען מ-YouTube רק כשלוחצים עליו.