getOption() in JS code

Avatar

Avatar

ramprakasht3196

Avatar

ramprakasht3196

ramprakasht3196

16-06-2020

Hi all,

 

We are using Javascript code for sms delivery. The URL used in the script is different for development and production. So I am planning to save the URL in option and this will be called in JS code using getOption(). When triggering sms delivery using the Javascript Iam getting below error

 

" getOption is not defined"

 

Same code I tried in Workflow using javascript activity, I can able see the option value in logInfo().

 

Could you please tell me what will be the issue.

 

Thanks,

Ram 

View Entire Topic

Avatar

Avatar

Milan_Vucetic

MVP

Avatar

Milan_Vucetic

MVP

Milan_Vucetic
MVP

16-06-2020

Hi @ramprakasht3196

include these libraries on the script beginning and try again.

loadLibrary("xtk:shared/nl.js");
loadLibrary("xtk:shared/xtk.js");
loadLibrary("xtk:shared/json2.js");
loadLibrary("xtk:common.js");

Regards,

Milan