Saturday, July 13, 2019

How to restrict access for "Sales Rep" role to have ability to view/access only Customers with status "Closed-Won"

Company would like to grant access to their Sales Reps only to customer records which are successfully closed and they are doing a business with them. At the same time restrict access for "Sales Rep" role to view Lead and Prospect records which don't have signed contract to make a business with them. It's possible to achieve this kind of functionality by using combination of restricted list view and workflow.

  • How to create a workflow which will restrict access to view Lead and Prospect records as well as Customer records which don't have status "Closed-Won":
  1. As the Administrator go to the Customization > Scripting > Workflow > New.
  2. Provide the Name.
  3. In Basic Information section set following:
    • Record Type = Customer
    • Sub Types = Customer, Lead, Prospect
  4. In Event Definition section se following:
    • On Create = T
    • On Update = T
    • Trigger Type = Before Record Load
    • Event Type = If there is nothing set, it has same functionality if there would be all parameters set (which is required for this workflow
    • Condition:
      • User Role = any of "Sales Person"
      • Status = none of "Closed Won"
  5. Save.
  6. Click on the New State button > Save.
  7. Click on the State 1 you've just created > click on the New Action button > select "Return User Error" action
  8. Set the "Return User Error" action as following:
    • Trigger On = Before Record Load
    • Event Type = If there is nothing set, it has same functionality if there would be all parameters set (which is required for this workflow)
    • Text = Provide an error message by which will be a user prompted (e.g. "Your role does not have a permission to access/view this record.")
  9. Save.

Now, users log into NetSuite using "Sales Rep" roles, they are able to see the List of Lead/Prospects/Customers which are not in status "Closed Won". However, when a user attempts to view one of these records, an error message that he/she has not permission to view these records will pop up.

  • In order to restrict list view of Leads/Prospects/Customers which are not in status "Closed Won" for "Sales Rep" role, it's necessary to create a custom Customer Saved Search. Doing so, follow the steps below:
  1. As the Administrator go to the Lists > Search > Saved Searches > New > select type as "Customer".
    • Provide the Name.
    • Public = T
    • Available as List View = T
  2. On Criteria subtab > Standard sublist > Filters set as following:
    • Status = is "Closed Won"
    • Stage = is "Customer"
  3. Save.
  4. Go to the Setup > Users/Roles > Manage Roles > edit the "Sales Rep" role.
  5. On the Searches subtab > Standard sublist set following:
    • Type = Customer
    • Search Results = Saved Search you've created in step #1
    • List View = Saved Search you've created in step #1
    • Restricted = T
  6. Save. 
"Sales Rep" roles, will not able to view Leads/Prospects/Customers which are not in status "Closed Won" as well as when a user navigates to Lists > Relationships > Customers, Leads or Prospects, he/she will see only restricted results set by criteria in Saved Search.

No comments:

Post a Comment