How to make Readonly to True/False Field?

m_servicenow
Kilo Contributor

Hi,

I am trying to make readonly from client script but still it can be edit. Can anybody give idea how we can do that?

 

I am using.. g_form.setReadonly('<Filed_name>',true);

We can make string filed to readonly easily but some difficulties in true/false filed.   Suggest any idea.

8 REPLIES 8

deepakvednegi
Giga Contributor

Please check on Incident form on https://createnow002.service-now.com/navpage.do



I did the same code and made the field readonly. Please let me know for any issue



Regards


Deepak negi


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Mukesh,



Can you paste screenshot as I am not able to replicate the same.



Thanks


Pradeep Sharma


Hi ,



Basically i want to make filed read only is on the incident form and i want to set read only through Workflow . See screenshot



I want to achieve with run script activity in workflow.



Captures.PNG


Hi Mukesh,



You cannot make field readonly using Workflow run script activity. If you want to make any field readonly, you can achive the same using below ways:



1) Client Script


2) UI Policy


3) Data Policy



Please mark answer as correct/helpful, if it was really helpful 🙂



Regards,


Solutioner


Logo.png


Enhance Knowledge NOW@ www.solutioningnow.com


http://www.solutioningnow.com/