The preliminary setup for a Lightning Org with multiple locations may include restricting the records visible to each Location. This is most efficiently accomplished using the Territories and adding a Flow to the out of the box Territory automation. You will need to stamp the Territory value from the related Address record, onto the Account record. This ensures that Accounts can be shared. NOTE: If you change the global Sharing Setting for Account/Contact to Private and the Territory data is not populated on Account records, Users will not be able to see Accounts and Contacts. Be sure there is an automation in place to populate Territory on the Account.
First you will need to ensure the Territory values are setup.
Navigate to Setup > Picklist Value Sets > Territory
Verify that all locations have been created as an Active Value in the picklist:
Note: If you are adding Values to the picklist be sure to select: Add the new picklist values to all Record Types that use this Global Value Set.
Next step is to change the Global Sharing Setting for Account and Contact to Private
Setup > Sharing Settings > Account/Contact > Private
Next you will need to setup a Role Hierarchy to allow each Location's data to be shared with User's in the location Role. Be sure each Location is a Subordinate of the Corporate Role, and none of the Locations are Subordinates of one another (unless you have a franchisee scenario and one entity owns more than one franchisee location).
The Role Hierarchy should look something like this:
Next you will need to create Sharing Rules to share records based on the Territory value.
You will create a Sharing Rule for each Location.
Finally, you can test the Sharing Rules by creating a Report and logging in as one of the Location Users.
First, run an Account Report grouped by Territory to see the number of records each location's employees should be able to see.
Group the Rows by Territory and click Run. You will see the total number of Accounts shared with each Location.
Next, locate a User in the Location A Role. You can navigate to the Roles menu, select the Location and then choose a User from the list of User's in that Role.
Click Login to login as this User.
Navigate to the Accounts Tab and choose the All List View
Notice that this User can only see Accounts in Location A, with one exception. She can see one Account in Location B. Let's open the record and investigate why she can see it...
Because this User created the Account that is in Location B, she can see it. Any records which this User Owns (typically the Created By User) they will also be able to see, unless the Owner is changed to someone in a different Location Role.
Comments
0 comments
Please sign in to leave a comment.