How to call script include in UI page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2022 02:14 AM
Can anyone help that how to call script include in UI page. I am trying to cleat cache in scoped application while loading UI page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2022 02:25 AM
Hi @raajesh
If you want to call Script Include in Client Script of UI Page, you have to use GlideAjax function. Please refer below link for it:
But if you want to call Script Include in 'Processing Script' which is server side script, you can try below syntax:
var result = new ScriptIncludeName().functionName(parameter);
For example if Script Include name is HelloABC and function is getAbcDetails(user_id) where user_id is parameter passed, you can use below code:
var rsult = new HelloABC().getAbcDetails(user_id);
- where rsult will staore the value returned from the function.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2022 10:14 PM
Hi,
I am getting error of "GlideAjax is not defined" while using new GlideAjax in UI page client script. I am trying to call function in client script which have glideajax script from the onload event of body tag in UI page.
Is there a way or any method to use GlideAjax in UI page?