OOB how variable editor is set to read only for Record Producer?

Rajat Singhal1
Tera Contributor

I come across two Client scripts: "Variable Editor Readonly" for sc_req_item and sc_task Table. However there is nothing for Record Producers. Does anybody knows OOB how variable editor are set to read only for record Producers? 

4 REPLIES 4

The SN Nerd
Giga Sage
Giga Sage

Those Client Scripts are disabled OOB.

You can make your variables read-only through Catalog UI Policies, or by copying those client scripts and changing it to the table for your given record producer.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

I hv enabled the two Client scripts and it worked fine for RITM and TASK. For incident" g_form.setVariablesReadOnly(true);" this function doesn't work

dmathur09
Kilo Sage
Kilo Sage

Hi Rajat,

We do not have such functionality in record producer. Service catalog has variables which can be hidden by this client script.

For record producer eg Incident, It should follow the normal process of making field read only via client script or UI Policies or ACLs.

Incident does not have variables but has fields hence  g_form.setVariablesReadOnly(true); will not work.

Regards,

Deepankar Mathur

Refer servicenow proposed workaround for making fields read only - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0752560

Regards,

Deepankar Mathur