Including third-party JavaScript libraries in UI Pages

Mauro15
Tera Expert

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.

1 REPLY 1

Dan Ellis
Kilo Sage

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