GlideAjax call on Workspace Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 01:55 AM
is it not possible to GlideAjax in a workspace client script under given function on onClick, i have tried to execute a simple one to test it out, but the response is not defined. Please find attachment for more detail, i have tried to customize copy of OOB Rescind button ( if additional information is required ).
The try block shows the following error stating : - Reference Error: answer is not defined

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 03:01 AM
Hi,
It should not be a case. You can see many OOB UI Actions using GLideAjax functionality in workspace client script.
Please put some logs/alerts in both client and server side scripts and see where it is breaking.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 03:10 AM
Hi,
Please use getXMLAnswer() syntax and try once
getChoice.getXMLAnswer(function(answer){
alert(answer);
});
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader