List view for a specific role or group

Hichem
Mega Expert

Hello,

I'm trying to do the following :

I've created a group (GroupA) with a specific role (RoleA).

I've created a homepage with some gauges (pie chart reports).

When members of GroupA click on a pie chart, he's redirected to the records list view.

I've created a UI View (GroupA_View) with RoleA and where in the "Lists" related list I've added the table impacted (application)

With all that, when members from GroupA are redirected to list view, they still get the "Default view"   😕

Any idea on what is missing there to achieve this view restriction?

Thanks in advance

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Not sure if this completely applies to your situation as it's globally restrictive, but you might take a look.



Restrict Form Views by Role - ServiceNow Wiki


View solution in original post

2 REPLIES 2

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Not sure if this completely applies to your situation as it's globally restrictive, but you might take a look.



Restrict Form Views by Role - ServiceNow Wiki


Hello Brad,



Thanks for your feedback.


Even if I've already seen this BR and what it does, I missed the link between it and what I want.


I've created a new Global BR, based on this one, and included in it, all tables where I want my role to have a specific view.



something like that :



function MyTableNameGetViewName() {

if (gs.hasRole("MyGroupRole"))


  answer = "MyViewName";


}



function MyTableName_listGetViewName() {


MyTableNameGetViewName();


}



And it works !





Thanks again for pointing me on the good direction