- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2020 03:14 AM
Hello All,
I have a requirement to exclude weekends and bank holidays, hence I am using GlideSchedule() & GlideDateTime() API's in server side scripts, can we use these APIs in client scripts?
what are the best practices to use these below two APIs
GlideSchedule()
GlideDateTime()
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2020 03:39 AM
You need to use GlidAjax and use these APIs in script include.
These are server side APIs and should not be used in client side code.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2020 03:39 AM
You need to use GlidAjax and use these APIs in script include.
These are server side APIs and should not be used in client side code.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2020 09:23 PM
Those are available only in server side so you cannot use in Client Side.
Please use GlideAjax if you wish to use it in client side
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
12-28-2020 09:29 PM
Hi
These are the Server Side API which are used in DB Operation.
There are 3 ways to get Server Side Data from Server to Client.
getReference() with call back function,display Business Rule with g_scratchpad object,client callable Script Include.
Please use the GlideAjax API in your client script and write one client callable script include.
call that script include using the GlideAjax
please refer this
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat