execute script include from action script on flow designer

Dana Israeli
Giga Guru

hey there,

i have a Flow and on that flow i am running an action.

the action as inputs, script, outputs.

on the script i want to call script include and get answer

my code is - it looks like the script include not getting like this: global.TranzillaUtil(); and because of that i am thinking its not executing. help??

(function execute(inputs, outputs) {
          //call scriptinclude
        var SI = new global.TranzillaUtil();
        var result = SI.CreditChargeByInvoice(inputs.card_id,inputs.account_id,inputs.invoice_total_amount);
 
  outputs.responsecode = result;
 
})(inputs, outputs);

6 REPLIES 6

Can you place log inside your script include function updateGroup() and see what you get? If possible, can you share the screenshot of your script include?

Regards,
Muhammad

Radek
Tera Expert

Hi, had the same issue in Vancouver - undefined, new global.NameOfScriptInclude()

it turned out - if it's under if condition than it's undefined..

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791144

 

Workaround: 

1. define flow variable in the body of the flow + use the script include (I haven't tested subflow which could be used as well)

2. use the defined flow variable in the action