- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 02:56 PM
I have implimented a Catalog Client Script that will make all the variables on a RITM and Catalog Tasks read-only once it has been submitted by the user.
The script I used is as follows:
This works perfectly fine apart from when the Fulfilment groups go into the RITM and then try to access a Task or leave the page. When they do this they get a pop-up message saying "Do you want to leave without saving?" when they haven't changed anything.
Does anyone know a way around this so the message stops popping up when they try and leave the main RITM page?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 07:51 PM
I have managed to get this working by adding g_form.fieldChanged = false; into my Client Script as per below example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 09:01 PM
Hi, the documentation for setVariablesReadOnly() states.
"The method must be placed in the client script of the table in which the variable editor is added, such as Requested Item [sc_req_item], Incident [incident], and so on."
and I suspect the issue may be that you are applying it as a Catalog Client Script include against a catalog item, and not as a Client Script against a target\end table.
GlideForm | ServiceNow Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 01:47 PM
Thanks Tony,
I gave this a go and created a Client Script against the sc_req_item table (as below) but got the same result unfortunately. I have sifted through the documentation and can't find anything that mentions this sort of thing happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 07:51 PM
I have managed to get this working by adding g_form.fieldChanged = false; into my Client Script as per below example: