Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to upload third part js file and used in widget?

jonnyyan
Kilo Contributor

Hi Team,

I want to upload third part js file ,like jquery-ui, datable.js and so on. is it possible to do this?

In the JS include, i don't know how to write the js url.

find_real_file.png

4 REPLIES 4

amaradiswamy
Kilo Sage

Hi Jonny,



You can place your js file code in UI scripts and you can include that JS file


find_real_file.png



Thanks and regards


Swamy


Harsh Vardhan
Giga Patron

Hi Jonny,



you can do it by both ways. either giving reference to a UI Script or provide a .js file link by "URL".


Please check the OOTB js include record.



  • detect.js ( Source: UI Script)
  • scripts/libs/selectize.min.js (Source: URL)


check the link below. hope it will help you.



https://libraries.io/github/mccolljr/ServiceNow-Documents



Thanks,


Harshvardhan


Hi Harsh



I have know how to use UI Script, could you tell me how to use URL.


my question is how to upload the js file into servicenow, which interface can i do it?


find_real_file.png


Hi Harsh,



I just use UI script to include datatable.js into service portal, but it not working


find_real_file.png