Learn Moar Admin Badge and text that says, “Scoping Rules."

Learn MOAR in Winter ’23 with Scoping Rules

By

Follow and complete a Learn MOAR Winter ’23 trailmix for admins or developers by November 30, 2022, 11:59 PM PT to earn a special community badge and enter for a chance to win one of five $200 USD Salesforce Certification vouchers. Restrictions apply. Learn how to participate and review the Official Rules by visiting the Trailhead Quests page.

Understanding scoping rules

Your users have access to a large number of records, #AwesomeAdmins. Each user wants personalized list views or reports based on specific criteria relevant to them, and this personalization can lead to a proliferation of lists and reports.

With scoping rules, you can control the default records that your users see based on criteria that you select, increasing productivity and personalization. You can set up scoping rules for different users in your Salesforce org so they can focus on the records that matter to them.

What impact does this have for admins?

Scoping rules give admins options to filter based on attributes on the user and the record. If you configure a list view or report, you can write specific criteria, such as Account.BillingCountry = US. List views don’t support traversing the Account or comparing based on values on the User record. With reports, you can create custom formulas, but they’re not as performant as writing filters on indexed fields.

Let’s walk through an example of when an admin may create scoping rules for users. Let’s say you have sales managers who need to visualize accounts based on a sales person’s region. You want to write criteria such as:

  • Account.Owner.Region__c = $User.Region__c

For simplicity, let’s assume there are five regions—North, West, South, East, and Global—that Sales Manager Sally can choose from. When Sally edits her own user record to “North”, and the list view says “Filter by scope”, she can see all accounts where sales people have North as their region. A simpler example would be:

  • Account.Region__c = $User.Region__c

User region is stored on the user record. The admin in this example wants to make it easy for users to edit their own user record without navigating to their user record edit page, so she creates a screen flow to allow a user to update their region from the utility bar.

Where can you use scoping rules?

Scoping rules are available on Account, Contact, Case, Event, Lead, Opportunity, and Task objects. You can determine the scoping criteria based on standard or custom fields.

Building your scoping rules

Admins begin the process of building scoping rules in Setup on the Object Manager. This is where you can build the scoping rules for a specific object and define which records the specified users are allowed to see.

Setup > Object Manager > Account > Scoping Rule.

Read this Create a Scoping Rule Salesforce Help article for a deeper dive into how to build scoping rules within Object Manager.

After you’ve created a scoping rule in Object Manager, users who match the rule’s user criteria will see a “Filter by scope” filter option in reports and list views.

User using Lightning Utility Bar with flow, adjusting a user’s region.

If the user selects “Filter by scope”, then results of the list view or report are further filtered by the scoping rule’s record criteria.

Get hands-on with scoping rules

Get hands-on with scoping rules in your Winter ‘23 Developer, Unlimited, and Performance Edition orgs.

See these new features in action!

Don’t forget to watch the replay of the Winter ’23 Admin Preview to see demos of a subset of these new, exciting features. Be sure to check out the Learn MOAR Winter ’23 for Admins Trailmix for more Learn MOAR!

Learn MOAR

conditional field formatting Winter '25

Conditional Field Formatting | Winter ’25 Be Release Ready

Winter ’25 is almost here! Learn more about Conditional Field Formatting and check out Be Release Ready to discover more resources to help you prepare for Winter ’25.  The challenge with configuring visual indicators today Creating custom visual indicators to call attention to key fields is a common Salesforce configuration requirement. Visual indicators make it […]

READ MORE