variables read only at requested items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 03:09 AM
Hi,
We have a few catalog UI Policies which make variables read-only on requested item view to prevents users from amending them after they've been submitted as this could affect audit if a group was changed or a workflow issue or other reasons.
It's a bit of a pain to have to create a UI Policy each time we create a product and I wondered whether there is a more simple way to make variables read-only at requested item level. Maybe a scheduled script that creates the UI policies looping through the variables for each catalog item and associated variables or if there's another even more elegant way to do it. A Business rule perhaps that make the fields read only or something?
Any ideas???
Kind regards,
Ben
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2016 04:28 PM
I prefer the method I reference here: Re: Should variables carried over to the RITM be read only?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2016 06:48 AM
Hi Ben,
Thanks for this question,
I would suggest to avoid any customization in order to stay aligned with the product (cost, maintenance, performance, upgrade...),
I recommend to use the SNC OOTB feature, managing access by role.
- Open the variable form
- Add "Write role" to the form/list
- Add "admin" role to the variable
The variable won't be editable anymore after the submission by a non-admin user.
Tips and tricks : Set it up as default value.
Configuration :
Result :
Thanks,
Regards,
Lionel COMANDINI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2017 07:16 AM
I just tried this in Istanbul and it made the variables read only within the Service Portal. Has anyone else noticed this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2017 07:25 AM
Hi Ben,
Have a onLoad client script and check the box Applies on Requested item
and below script
g_form.setVariablesReadOnly(true);
This will make all variables readonly on submitted RITM
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2025 01:20 AM
on load client script or onload catalog client script?
@Ankur Bawiskar