Open Service Portal page when user tries to access specific table

Tobias Persson_
Tera Expert

Hi community!

 

We have users that have access to the "normal" ServiceNow view. But we only want them to use Service Portal pages for a specific table (lets call it "x_my_table"). 

 

I have tried sys_navigator but the script is only working when the user clicks any record on x_my_table. What I want to achieve is that as soon as the user tries to access x_my_table the user is redirected to a specific portal page without the list view ever to be shown.

 

For reference, here's my current sys_navigator script for x_my_table:

 

if (!gs.hasRole('any_role')) {
  answer = "/sp";
}

 

 

How would I achieve that?

 

Thanks and regards,

Tobias

0 REPLIES 0