- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2012 02:55 PM
I found a very nice script (http://www.servicenowguru.com/scripting/business-rules-scripting/variables-form-readonly/) to lock down variables on a Service Catalog task however there is one variable that I don't want locked down. I've tried a number of ways to skip over this one variable or make it setReadOnly to be false once the script set the element to read only. All my attempts have failed. I am fairly new at writing JavaScript so I probably don't completely understand accessing elements yet. I've tried g_form.setReadOnly('variables.UserID',false); and g_form.getElement('variables.UserID').readOnly = false; amoung other things. None appear to work. Would someone know how I can make this one variable editable? The name of my ServiceCatalog variable is UserID. It is not ServiceNow's UserID.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 02:36 PM
We are on Eureka now. Catalog UI Policies allow you to indicate if a variable should be read only, Mandatory and/or Visible. It also allows you to choose if you want it to apply to a Catalog Item, Task and/or Requested Item. I hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 01:54 PM
I need to do this, too - and cannot get it to work. Tried modifying the script from SNGuru to omit that one variable from the scratchpad. It doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 02:36 PM
We are on Eureka now. Catalog UI Policies allow you to indicate if a variable should be read only, Mandatory and/or Visible. It also allows you to choose if you want it to apply to a Catalog Item, Task and/or Requested Item. I hope that helps.