We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Hide high and medium options in impact field when selected user doesnt have certain roles as below

marrikruthi
Tera Contributor

When a user is creating a new incident record, if he does'nt have the incident_impact_urgency_write role remove high and medium impact options from incident form using client script.

1 REPLY 1

Sid_Takali
Kilo Patron

Hi @marrikruthi Try below onLoad Client Script code

if(g_form.isNewRecord()){
var isAdmin = g_user.hasRole('incident_impact_urgency_write');
	if (!isAdmin){
		g_form.removeOption('impact', '1');
               g_form.removeOption('impact', '2');
	}
}