Only display network in the category field

Beth_Linda
Giga Explorer

Hola

 

I have a role called "network_configuration" within my instance, If I open a change request as, I need a way to only display "network" in the category field of change.

 

How can I achieve this?

 

Thank you all and please be kind as I am just now getting into ServiceNow development 

5 REPLIES 5

abirakundu23
Mega Sage

Hi @Beth_Linda ,

Please try in that way. Create onload client script & add below code, whatever option display in category add removeoption() for same & add addoption() for network category.

absnow1_0-1695880167813.png

 

Please let me know.

Please mark helpful & correct answer if its helpful for you.

Hi @Beth_Linda ,

Is it working??

Please mark helpful & correct answer if it helps for you.

Hi @Beth_Linda ,

Is it working??

Please mark helpful & correct answer if it helps for you.

RAMANA MURTHY G
Mega Sage
Mega Sage

Hello @Beth_Linda ,

You can write onLoad client script on the change_request table as below

if(g_user.hasRoleExactly('network_configuration')){
	g_form.clearOptions('category');
	g_form.addOption('category','network','Network');
}

 

Please mark my answer correct & helpful, if it helps you

Thank you

 

 

 

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer