Set variable read only on order guide

martin63
Tera Contributor

Hello all,

I want to implement set variable read only on order guide on the choose option page but not able to find any solution tried doing below catalog client script on order guide but it is not working any help????

 

function onLoad() {
    
    setInterval(function(){
    var url = this.location.href;
    if(url.indexOf('sc_cat_item_guide')>-1){
        g_form.setReadOnly('my_variable',true); 
    }
    else{
        g_form.setReadOnly('my_variable',false); 

    }
},2000);
}

4 REPLIES 4

Community Alums
Not applicable

Hi Martin,

This thread should help you to achieve your requirement:

https://community.servicenow.com/community?id=community_question&sys_id=2baaf04fdbb78c986064eeb5ca96...

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

some other solution??

Check this

https://community.servicenow.com/community?id=community_question&sys_id=27a90882db9258d0fa192183ca961999

Regards
Harish

Hii Thankyou it works!!!