No communication between Client and Server Script (UI Pages, Script Includes)

danielgd
Tera Contributor

Hello,
I'm fairly new to ServiceNow and still testing around what it can do in the Demo version of Xanadu.
Currently, I'm just trying to create a test UI Page, but I'm having Issues with executing a Script include through the UI Page Client Script:

Annotation 2024-11-13 171431.png

 

Script Include "TestClientServerCommunication":

Annotation 2024-11-13 171432.png

 

UI Page in action:

Annotation 2024-11-13 171433.png

I made sure the Script Include was Client Callable and active and tried out different ways of Calling it through GlideAjax ("user.APIName" vs. "APIName"), but I still couldn't get it to work. I assume I still didn't configure Access correctly or maybe this is a restriction because I'm still using the Demo.

 

I hope someone has a solution to this and can help me out.
Thanks!

1 ACCEPTED SOLUTION

Prana Krushna
Giga Guru

Your client script is like 

PranaKrushna_0-1731596981403.png

 

It shouldbe like this for client callable

PranaKrushna_1-1731597050275.png


Try this let me know if you have any issue or mark this helpful if it works for you

 

View solution in original post

3 REPLIES 3

Prana Krushna
Giga Guru

Your client script is like 

PranaKrushna_0-1731596981403.png

 

It shouldbe like this for client callable

PranaKrushna_1-1731597050275.png


Try this let me know if you have any issue or mark this helpful if it works for you

 

danielgd
Tera Contributor

Thanks!
After I applied the code Like you showed I didn't get the No Response From Server Message anymore, but then had an error regarding the Response in the console. Switching from getXMLAnswer to getXML in my Code solved this issue aswell.
Now it works as expected.

Great