how to disable options in choice list

sathishk
Mega Contributor

Hello,

We need to disable/unselectable some choices in the state field. In helsinki version we were using 'document.getElementById' to disable the option in the onload client script and is working fine. But when our instance got upgraded to Jakarta it is not working... all the choice list options were selectabe by the users where it should not.

Based on the suggestion provided 'https://www.servicenowguru.com/scripting/client-scripts-scripting/removing-disabling-choice-list-opt... ' I tried to write a new UI script and called that function in onload client script but it is not working.

Can anyone help me in fixing this issue.

The weird part is 'document.getElementById' is working in my personal developer instance which is in Jakarta version.

Regards,

Sathish.K

11 REPLIES 11

Sreeraj
Tera Contributor

Hi Satish,

 

Could you please share the script?

Hi Sathishk,

I have a similar kind of requirement. could you please share the tech docs for the same. 

Thanks & Regards,
Abhi