Trying to remove request approval ui action from standard change

RBlor
Mega Guru

Hello,

we added an "assess" stage  to our standard change but now i have the "request approval" ui action showing

I would like to hide the "request approval" UI action from standard change but my condition doesn't seem to work:

 

condition:
gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isAuthorizeAvailable()&&type!=standard

any idea why it is still showing?

 

ui action conditionui action condition

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi @RBlor,

 

Try this updated condition as  -

 

gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isAuthorizeAvailable() && current.type!='standard'

 

or

 

gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isAuthorizeAvailable() && current.type=='normal' || current.type=='emergency'

 

Thanks,

Sagar Pagar

The world works with ServiceNow

View solution in original post

4 REPLIES 4

Sagar Pagar
Tera Patron

Hi @RBlor,

 

Try this updated condition as  -

 

gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isAuthorizeAvailable() && current.type!='standard'

 

or

 

gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isAuthorizeAvailable() && current.type=='normal' || current.type=='emergency'

 

Thanks,

Sagar Pagar

The world works with ServiceNow

nope didnt seem to work. any other ideas?

jaheerhattiwale
Mega Sage
Mega Sage

@RBlor There are 2 issues in the condition line. One is hasRole function accepts only one parameter and second is type!=standard should be current.type!='standard'

 

So the condition line should be changed as below:

 

(gs.hasRole('itil') || gs.hasRole('sn_change_write')) && new ChangeFormUI(current).isAuthorizeAvailable() && current.type!='standard'

 

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

thank you but nope didnt seem to work...