- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 04:31 AM
Hi Community,
I have created a high severity portal form using the Record Producer, and it has been placed in the ESC Portal.
And I have included the 'Incident Variable Editor' on the incident form whenever a user submits the above form from the ESC portal. Then, the incident variable editor is visible as shown below
The requirement is to set the Incident Variable Editor on the incident as read-only
Please help me with how to set the Incident Variable Editor to read-only
Thanks,
Srinivasu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 09:27 AM
Hi @Srinivasu2 ,
To set the Variable Editor to read only a different table like incident, please follow these steps:
- Create a Client Script on the Incident table
- Paste the following script:
function onLoad() { $("variable_map").querySelectorAll("item").forEach(function(item){ var variable = item.getAttribute("qname"); g_form.setReadOnly("variables."+ variable, true); }); }
- This will require to uncheck (set to false) the "isolate script" checkbox (This checkbox is not on the form by default) Steps below how to bring it to the form)
- To do that right click in the header -> Configure -> Form Layout
- On the left side find "Isolate script" and bring it to the right and save
- Save changes
This should make the Variable Editor on the incident table read-only
Please follow this article for further reference :https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0752560
Please mark my answer correct/helpful if it resolved your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 09:27 AM
Hi @Srinivasu2 ,
To set the Variable Editor to read only a different table like incident, please follow these steps:
- Create a Client Script on the Incident table
- Paste the following script:
function onLoad() { $("variable_map").querySelectorAll("item").forEach(function(item){ var variable = item.getAttribute("qname"); g_form.setReadOnly("variables."+ variable, true); }); }
- This will require to uncheck (set to false) the "isolate script" checkbox (This checkbox is not on the form by default) Steps below how to bring it to the form)
- To do that right click in the header -> Configure -> Form Layout
- On the left side find "Isolate script" and bring it to the right and save
- Save changes
This should make the Variable Editor on the incident table read-only
Please follow this article for further reference :https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0752560
Please mark my answer correct/helpful if it resolved your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 10:02 AM
change the ui macro