
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
If you've encountered an error message when updating a service catalog request, the likely suspect is the write-only admin role that's been created for a catalog item. When you go to update a request, you'll receive this error message:
"Submit canceled due to a script error - please contact your System Administrator"
This specifically can happen when this write-only role admin role is applied to the checkbox variable. For example, if you update a hardware item, say your laptop, and make one of the checkbox variables write-only for admin, any updates made to this specific catalog request will result in this error. The user essentially fails the Write access control list (ACL) on the checkbox variable.
Instead of restricting write access through the variable record, administrators can correct this by creating a catalog client script that checks for the user's roles and disables the field.
How to create a catalog client script to check user roles:
- Navigate to Service Catalog > Catalog Policies > Catalog Client Scripts.
- Click New.
- Fill in the fields, as appropriate (see table), and add this script:
function onLoad() {
var isAdmin = g_user.hasRole('admin');
if (!isAdmin){
g_form.setReadOnly('VARIABLE_NAME', true);
}
else{
g_form.setReadOnly('VARIABLE_NAME', false);
}}
- Click Submit.
With this method, you can also enable Applies on Catalog Tasks and Applies on Requested Items to make it work in other places:
For more on service catalog items:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.