GlideAjax call on Workspace Client script

iLLuMinORG
Kilo Guru

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


2 REPLIES 2

Anil Lande
Kilo Patron

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

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Please use getXMLAnswer() syntax and try once

getChoice.getXMLAnswer(function(answer){

alert(answer);

});

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader