How to call REST Message from UI Page client script

Enrico Domingo
Kilo Contributor

Hi, I want to call a REST Message which i setup from UI Page that I created.

The reason for this is I want to use sn_auth.GlideOAuthClient() which requesting a token to azure ad.

tried writing a javascript ajax or xhr but i'm having cors error

7 REPLIES 7

that link is just an example.

You can write your GlideAjax call in UI page client script

How to write GlideAjax -> link already shared

I hope you are comfortable in scripting

Regards
Ankur

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

what I did was similar to this. https://community.servicenow.com/community?id=community_question&sys_id=055f8fe1dbdcdbc01dcaf3231f96199c

 

but the problem is i dont get anything from the ajaxResponse as it is undefined in my client script 

So what debugging have you performed?

is the script include client callable?

did you debug it?

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