Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Hide impact choice when caller is vip

Mani60
Tera Contributor

Hi All

If the caller of incident is a VIP user then Impact choice "VIP User" should be visible otherwise not visible.

Could you please help me on this to get the proper solution.

 

Thanks

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Mani60 

 

Create UI policy

 

Caller.VIP = True

 

UI Policy actin

Hide impact.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG Thanks for you reply
But i don't want to hide impact , i want to hide impact choice when caller is non vip user. 

Hi @Mani60 

 

https://www.servicenow.com/community/itsm-forum/how-to-hide-choice-options-without-removing-them/m-p...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Harish KM
Kilo Patron
Kilo Patron

Hi @Mani60 create a client callable script include and use glideAjax in client script to check caller is VIP and to hide choice

Script Include:

 

checkCaller: function()
{
var caller = this.getParameter("sysparm_callerID");
var user = new GlideRecord('sys_user');
user.get(caller);

return user.vip.toString();
},

client script:

var ga = new GlideAjax('scriptincludename');
ga.addParam('sysparm_name', 'checkCaller');// function name from script include
ga.addParam('sysparm_callerID', newValue); // addparam passed to script include
ga.getXMLAnswer(function(answer) {
alert(answer);
if (answer ==true) {
g_form.removeOption('fieldname', choicename,choicevalue);
} else {
g_form.addOption('fieldname', choicename,choicevalue);
}
});

 

 

Regards
Harish