- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 10:42 AM
making the field read only based on catalog task state
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 12:19 PM
You can write a client script on Task table onChange on field name State.
var catalogitem = g_form.getValue('u_item');
if(catalogitem=='Your catalog Item')
if(newValue==closedvalue && catalogitem=='Your Catalog Item')
{
g_form.seReadOnly('variables.Yourvariablename',true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 12:14 PM
For the RITM , there are 4 tasks so for, when I close the task1 , RITM will not get closed , but the variable s should be read only here

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 12:35 PM
check the link below.
https://www.servicenowguru.com/scripting/business-rules-scripting/variables-form-readonly/
Thanks,
Harshvardhan
Hope this helps.Mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 12:19 PM
You can write a client script on Task table onChange on field name State.
var catalogitem = g_form.getValue('u_item');
if(catalogitem=='Your catalog Item')
if(newValue==closedvalue && catalogitem=='Your Catalog Item')
{
g_form.seReadOnly('variables.Yourvariablename',true);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2018 08:20 AM
Where I attempted to create a new UI policy, it wouldn't allow me to drill down to my list of variables. When I navigate to the field name list and add, there is only one selection for "variables".