Upload .Js script reference file to K2 cloud server

  • 23 November 2020
  • 1 reply
  • 6 views

I have a JavaScript library file (.js).I wants to use this reference in all forms.Is there a way to upload the file to K2 cloud server ,So we can use that reference in all forms. It is larger file so I can’t add the script to database to refer. Please suggest


1 reply

Userlevel 3
Badge +5

This might be a bit late but I’ve had great success by storing all my scripts in a smartobject. I load them using a stored proc in the initialize event. The proc lets me replace strings in the file while loading. This allows me to write one script and if I need to target a particular control for instance, I can supply the name of that control for each view I use it in. The major benefit of doing this is I can write the code in VS Code, save to a file and use bulk insert to write directly to the database. Bit more setup when using Azure SQL but all possible.

Reply