Including third-party JavaScript libraries in UI Pages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2020 01:06 AM
Hi all, I was wondering how can we include external js libraries (i.e. DataTables, ChartJS, ...) into UI pages. I am building a dashboard hosted on SN with data fetched from external APIs.
Any suggestion is more than welcome. Thanks a lot.
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2020 04:05 PM
Hi Mauro,
You should add the external library into a UI Script.
In the HTML/Jelly part of your UI Page you can include the UI Script.
Note though that UI Scripts run client-side and not server-side.
Here's a link to the docs about UI Scripts and how to call them https://docs.servicenow.com/bundle/paris-application-development/page/script/client-scripts/concept/...
Thanks, Dan