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 set HTML variable read only in a catalog item in Istanbul version

sreejith12
Tera Expert

hello Team,

I have tried below steps to make the HTML variable read only in the catalog item but it doesn't work.

1) Create a catalog client script " On load" with below script:

function onLoad()

{

g_form.setReadOnly('variable_name',true);

}

2) Created a Catalog UI policy and made the variable read only.

3)Set "Create roles" and "Write roles" to "nobody" on the HTML variable.

None of these techniques work to make the HTML variable read only. Please let me know if there is any way out on this.

Thanks,

Sreejith

8 REPLIES 8

Yaa, That doesn't matter it can be same but case sensitive.



It should work. Not sure what went wrong in your case !!



Thanks,


Santo


Yeah, something is missing as it's working in my developer instance but not in my official one.


Try creating one more HTML variable and write UI policy. leave the old one !! let us give a try.



Thanks,


Santo


Karthik Reddy T
Kilo Sage

Hello Nair,



Can you please cross verify the UI Type in the client script?



It should be all.


Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.