How to make fields read only using Client script

shaik_irfan
Tera Guru

I am a newbie to Snow i wrtten client script on incident but fields are not getting read only:

function onLoad() {

    //Type appropriate comment here, and begin script below

    alert("testing");

g_form.setReadOnly('number', true);

g_form.setReadOnly('date_format',   true);

}

13 REPLIES 13

Aakash Shah4
Tera Guru

There might be another UI policies which take precedence over cs


Aaskash,



I dont think there is any other UI Policy since it is my own instance


anjalichoudhary
Kilo Guru

Hi Shaik,



You can use UI Policy   to make fields Read Only and mark on load checkbox true. Here making Priority field Read Only on Incident form.



find_real_file.png




You can inactive your Client Script and try doing it through UI Policy.



Please mark Helpful or Correct as per impact of the response!!



Thanks,


Anjali