Overview
If we want to give users an access to customer records, we need to navigate to their respective roles and add the Customers permission on Permissions subtab > Lists sublist. The Customers permission also provides access to lead and prospect records. If your business process requires you to give some of your users full access to lead and prospect records but only view access to customer records, you'll need a customized solution as this is not possible with standard permissions. With a custom field and a user event script, you can restrict certain users from creating and editing customer records.
How?
1. Create a custom check box field for one of the ff. records:
- role - can be found in Customization > Lists, Records, & Fields > Other Record Fields > New
- employee - can be found in Customization > Lists, Records, & Fields > Entity Fields > New
2. Identify which roles (or users) are going to be customized. Make sure that the custom check box field (created from step 1) on these records is ticked. On Permissions subtab > Lists sublist, add the Customers permission and set it to Edit or Full.
3. Write and deploy a user event script with beforeLoad function for customer records.
- Add a condition that will check if the current user is doing a non-view access.
- Get the role internal ID of the user (or the employee record internal ID of the user, depending on your choice from step 1).
- Get the value of the custom check box field of the role (or the employee record).
- Create and throw an error message if the value from step 3.3 is true.
4. Test the script using different roles. It should only affect the roles or users identified on step 2. Other roles or users that are not updated on step 2 should not be affected by the script.
How do you manage the roles in your account? Share your ideas in the comment section below.
@Erick Dela Rosa-Oracle