Wednesday, November 7, 2018

Setting Access to Customer Records through Workflow

Roles and Permission in NetSuite can let you set the access of Sales Reps to not be able to view Customer Records that are not assigned to them.

On this particular case, Management does not want specific Customers to be viewable by anybody. Only Administrators should have access to this record.

Since this is not possible through Roles and Permission in NetSuite, a Workflow can be used to set the access restriction. To specify that the record should be restricted, a Custom Checkbox is marked. Once this field is checked, only Administrators will be able to view it.

Here are the steps on how to do it:

I. Create a Custom Field (Name: Private Customer)
1. Navigate to Customization > Lists, Records, & FieldsEntity Fields > New
2. Type is set to Checkbox
3. Store Value is checked
4. Applies to is set to Customer
5. Click Save

II. Create a Workflow
1. Navigate to Customization > Workflow > Workflows > New
2. Set the following:

Name: Restrict View
Sub Types: Lead, Prospect, Customer
Initiation: Event Based (check On Create & On Update)
Trigger Type: Before Record Load

3. Click the New State button
4. Under the Actions tab, click on New Action button
5. Select Return User Error from the list
6. Set the following:

Trigger on: Before Record Load
Use
Visual Builder
Parameters:
You cannot view this record

7. Set the following on the Visual Builder to create two conditions:

Field: Private Customer (Custom Field)
Compare Type: Checked

Field: Role
Compare Type: Any of
Selection: Administrator

8. Save the Workflow

With this Workflow set to released, Customer records which has the checkbox Private Customer checked, will not be viewable by other users. Only Administrators have access to this record. For non-Administrators, they will get the error "You cannot view this record".

No comments:

Post a Comment