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.

Use ServiceNow SDK module in ServiceNow client scripts

Malte_K
Tera Expert

Hi,

 

I successfully installed the ServiceNow SDK on my local machine and created a first hello world js module, which I uploaded to my PDI.

 

The module exports a function helloWorld which just returns an string 'Hello, world!' for testing purpose.

 

In a business rule (server side) I can use the function with the following code:

 

const { helloWorld } = require("x_206516_sdk_demo/sdk-demo/1.0.0/src/myModule.js");
gs.addInfoMessage(helloWorld());

 

Does anyone know if it is possible to use modules created via ServiceNow SDKs in client scripts, ui pages etc.?

 

Thanks!

 

Malte

1 ACCEPTED SOLUTION

Swarnim1
Tera Expert

If I heard correctly on the Break Point Podcast, these modules are only for server-side scripts.

View solution in original post

3 REPLIES 3

Swarnim1
Tera Expert

If I heard correctly on the Break Point Podcast, these modules are only for server-side scripts.

btippens2
Tera Contributor

Currently Rhino/ server side only, but possibly on roadmap for the future. I'm loving the SDK