I want to hide Standard Change link in Change Request Interceptor if logged in user is in specific group

rpoola
Tera Contributor

Hi,

I want to hide Standard Change link in Change Request Interceptor if logged in user is in specific group.How can I achieve this.I have tried in calling method in the Script Include which returns true or false but it is not working.

 

 

Thanks

Ravi

1 ACCEPTED SOLUTION

The only way you could hide this on basis of group is a query business rule on sys_wizard_answer table. 

if(gs.getUser().isMemberOf('group_sys_id')){      //restrict for a particular group

current.addQuery('name','!=','answerName');

}

View solution in original post

13 REPLIES 13

Can you please post screenshots of query br?

Its working now.

 

Many Thanks Gurpeet.

Dear Gurpreet,

Can you please mention what field or value i need to mention on the current.addQuery().  What would the 'answerName' refer to?  

 

 

go to https://instance.service-now.com/sys_wizard_answer_list.do

Find the value in the 'name' column that you want to filter out.  That is what gets put in the 'answer name' above.

I know this is an old thread, but you sir or madam are a wizard.  I never would have thought of doing that, but it is a brilliant approach and works like a charm!   Thank you!!