- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:13 AM
I am using g_form.setVariablesReadOnly(true) to make the variables Read-Only. But I have a requirement to make the variables editable on RITM form at a certain stage.
Using a client script to set those variables editable doesn't seem to work. How do I achieve this? I am using the Jakarta version.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:32 AM
Hey Mayank,
Creating UI Policy based on condition would be fruitful.
Please Hit ✅Correct, âÂ��Helpful, or ��Like depending on the impact of the response
Have a lovely day ahead

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:16 AM
You can either use a client script, UI policy, Catalog UI policy or a catalog client script to do. Choose whatever fits your need.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:25 AM
if you have written any catalog client script or catalog ui policy to make the variable read only and you don't want that should be read only at RITM level then in catalog client script or catalog ui policy has option "applies on request items" unchecked it then that will not apply to RITM level.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:31 AM
if you want to make it editable that variable then you should pass it "false" parameter.
share your script?
- g_form.setVariablesReadOnly(false); //"true": make it read only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2017 01:39 AM
This is a global script I'm using to make variables readonly on RITM (exception being SD users):
function onLoad() {
//Type appropriate comment here, and begin script below
if((!g_user.hasRole('service_desk'))){
g_form.setVariablesReadOnly(true);
}
}
Now I need to make variables on some items as editable(at a certain stage) to itil users as well. I have tried the UI policy on that variable as Read-Only false on RITM. It doesn't work.