How to call REST Message from UI Page client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 02:12 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 04:42 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 10:21 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 11:04 PM
So what debugging have you performed?
is the script include client callable?
did you debug it?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader