GlideModal call back function not working - error - Uncaught ReferenceError: <<name of callback function>> is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 02:28 AM
I am trying to replicate the functionality of Cancel Change request on one of my custom form.
I created exactly same UI Action (Cancel Change) and UI Page (change_confirm_cancel) as that of OOTB change cancel functionality.
However, I am able to get dialog window to enter the comments but when I click on OK button on the dialog box, it does nothing (dialog doesn't get closed) and I can see error in browser debug window:
VM7492:4 Uncaught ReferenceError: moveToCancel is not defined
at HTMLButtonElement.cancelChangeRequest (eval at evalScript (js_includes_doctype.jsx?v=03-02-2020_2243&lp=Tue_Mar_03_02_34_58_PST_2020&c=5_59:84), <anonymous>:4:3)
cancelChangeRequest @ VM7492:4
Interestingly, same OOTB functionality, with same code works fine in Change management.
Any help appreciated.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 02:30 AM
Is the function moveToCancel() defined in your UI action?
It may be a UI Script loaded in the Change form but not in your form / table.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 02:33 AM
In fact, I was created function on different name suitable to my requirement to capture rejection reason. However that was not working. Hence I copied as it is script from OOTB objects, but still that didn't work.
Same working fine on change form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 02:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2020 12:22 PM
Hello friend, I have the same problem, how did you solve it? Thanks and regards.