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 call script include from business rule containing multiple parameters

Chiranjeevi K
Tera Expert

Can someone help with the script to call the script include from the Business rule with multiple parameters , I know we can call something like below but looking for detailed explanation

new().script include name().function name ()

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

It is like below

new ScriptIncludeName().FunctionName(parameter 1, parameter 2, parameter 3);

OR

var objName = new ScriptIncludeName();
objName.FunctionName(parameter 1, parameter 2, parameter 3);
-Anurag

View solution in original post

2 REPLIES 2

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

It is like below

new ScriptIncludeName().FunctionName(parameter 1, parameter 2, parameter 3);

OR

var objName = new ScriptIncludeName();
objName.FunctionName(parameter 1, parameter 2, parameter 3);
-Anurag

udaysingh16
Tera Contributor

Hi,

 

Generally you pass parameters in function -

new ScriptIncludeName().FunctionName(parameter 1, parameter 2, parameter 3);

 And define the function in same way inside script include.

 

Link - Article

 

Please mark this helpful, if this is correct.

 

With Regards,

Uday Singh