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

Learn Moar Admin Badge and text that says, “Automatic Change Tracking.”

Learn MOAR in Winter ’23 with Automatic Change Tracking

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 […]

READ MORE

Your Guide to the Improved Salesforce Setup Menu Interface

New in the Summer ’13 release, Salesforce improved the Setup user interface with an Improved Salesforce Setup Menu Interface. Now for the experienced Admin the first time you enable the new interface it will take you back to the first days of being an Admin- at least it did for me. But worry not, I’ve put together […]

READ MORE

Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?

SHARE YOUR IDEA