Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to make variable editable on ritm after submit for some users only

Rajababu
Giga Guru

Hi ,

Can any help to create I want make editable variable fields on RITMS.

Any way to do it.

1 ACCEPTED SOLUTION

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);


}

View solution in original post

6 REPLIES 6

Upender Kumar
Mega Sage

Hi,

You can use below script:

 

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'),false);
} catch (err) {
}
});

}

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);


}