
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2019 11:34 PM
Hi ,
Can any help to create I want make editable variable fields on RITMS.
Any way to do it.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2019 11:44 PM
Hi ,
I found the way i need to resolved .
function onLoad() {
if(g_form.getValue('cat_item')!='sys id of catalog item' && !g_user.hasRole('itil'))
g_form.setVariablesReadOnly(true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2019 11:38 PM
Make "Variable Editor Readonly" client script true which is written on sc_req_item table.
and use script like
if (g_user.hasRoleExactly('role_name')) {
g_form.setVariablesReadOnly(false);
}
g_form.setVariablesReadOnly(true);
try this
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2019 12:13 AM
It's not working . still showed same thing
I created on load .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2019 04:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2019 04:18 AM
Hi,
You can use below client script onLoad on Requested Item table:
function onLoad() {
if(document.getElementById('variable_map')){
$(variable_map).select("item").each(function (elmt){
try {
g_form.setDisabled('variables.' + elmt.getAttribute('qname'),true);
} catch (err) {
}
});
//Hide Attach Report containers
try{document.getElementById('container_aed9304c6fcb2100bd7ac5cbbb3ee439').style.display = 'none';}catch(e){}
try{document.getElementById('container_bb5596bf6f472100de7ee1b3dd3ee4f3').style.display = 'none';}catch(e){}
}
}