How to make the variables from record producers read only on a case form.

Daniel R2
Kilo Sage

Hi,

 

On our current project. On case forms, we are displaying the record producer variables on the case form.

However after the request has been submitted and an agent is working on the case. It is possible for them to edit the variables from the case form.

However we dont want this to be possible. How can we make these variable fields read only so an agent can not edit the requesters answers?

 

DanielRyszka_0-1675685136437.png

 

6 REPLIES 6

Community Alums
Not applicable

Hi @Daniel R2 ,

 Use this KB and replace with your Table and Variable :

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0683863

 

Community Alums
Not applicable

Hi @Daniel R2 ,

 

Daniel R2
Kilo Sage

@Community Alums - Thanks for your reply Sandeep that works perfectly, and is exactly what is required.
However, is there any way to do this via script? 
Only want to ask because we have over 60 record producers all with many variables, so it would take a while to go through each variable adding the write role.

Community Alums
Not applicable

Hi @Daniel R2 ,

 You can write "Catalog Client Script" , and for the variables you want it to be read only, follow the syntax:

g_form.setVariablesReadOnly(true);