- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 03:52 AM
Hi All,
I want to set all the variables (ex: IT Onboarding Ticket etc..) read-only only on the RITM (not on Catalog Item) if the item: "Employee Requirements" and Assignment group is not "NAR CIB Onboarding" (please see below snippet)
Could you please help me!
Thanks & Regards,
Bhaskar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 04:16 AM
Hi Bhaskar,
If you want to restrict this behavior only for one item,you can write the above script on Employee Requirements item in Catalog client script instead of Requested Items Table and you can set a condition as
function onLoad() {
if(assignment_group!='NAR CIB Onboarding')
{
g_form.setVariablesReadOnly(true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 03:56 AM
Hi Bhaskar,
Please use on Load Client script on sc_req_item tables as
function onLoad() {
g_form.setVariablesReadOnly(true);
}
I have used this and it is working fine for me.
Thanks&Regards
Lakshmi Vallisetty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 04:01 AM
Hi Lakshmi,
I want to set read-only the variables if item: "Employee Requirements" and Assignment group is not "NAR CIB Onboarding" only.
Could you please help!
Thanks & Regards,
Bhaskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 04:16 AM
Hi Bhaskar,
If you want to restrict this behavior only for one item,you can write the above script on Employee Requirements item in Catalog client script instead of Requested Items Table and you can set a condition as
function onLoad() {
if(assignment_group!='NAR CIB Onboarding')
{
g_form.setVariablesReadOnly(true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2018 07:10 AM
Please note that g_form.setVariablesReadOnly() method is undocumented and therefore not officially supported method. It is best practice to make field/variable read only using Catalog UI Policy.