How to Call Client callable Script Include from public UI page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 08:04 AM - edited 05-24-2024 08:07 AM
Steps 1: Created below UI page and Made Public by creating a record in the sys_public table.
sys_public record:
Step 2: Created a client callable script include:
Step 3: Created UI Script:
Here line no 11 alert is popping up.
Based on the steps outlined above: Upon reaching the UI page below, the expectation is for an alert to pop up, and for the info message from the client-callable script to be logged into the logs table. However, neither of these actions are occurring. It appears that the script include is not being triggered by the GlideAjax call.
(https://xxxxx.service-now.com/ui_page_name.do?sysparm_instanceid=4d3f1c2f.
I'm not sure where I'm going wrong, so any input or suggestions would be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 08:58 AM
the 'alert()' function is client side API and wont work in a script include (server side). And your script include class is 'CustomtestClientSI' where in the UI script you have 'CustomDocuSignClientSI'. change one or the other to match. I suggest you review OOB UI Scripts that use GlideAjax to see working examples. the UI Script named 'IncidentalsCalculator' is a good example.