Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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


}