Set Variables readonly on RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2021 07:35 PM
Hi Community
I need help for the below requirement
I want to make the variables read-only on the RITM form. I wrote a UI policy on the RITM table please find it below
This is working, but I have some variables for which the "Name" starts with "Edit_" should be editble on the RITM.
I have tried the below code, but it is not working
g_form.setReadOnly('variables.nameLIKEEdit^active=true','false');
Can you please help me if there is a way to fix this
Thanks in advance
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2021 10:04 PM
Hi,
try this,
To make the VEditor read-only in Now Platform, activate the onLoad client script, Variable Editor Readonly, for the following tables: Requested Item [sc_req_item].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2021 10:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2021 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2021 10:37 PM
As mentioned by members you can directly use catalog client script and no need of UI policy
Ensure this when you create catalog client script on your Catalog Item
UI Type - Desktop
Applies on Requested Item - True
Script:
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setVariablesReadOnly(true);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader