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 pass parameter in script include from business rule

msmmithlesh
Tera Contributor

I am calling my scriptinclude from a BR and i want to send some parameter in this script include from BR to script include

and also how can i fetch these value in script include

sample BR code:-

var incNumber = current.number;

var x=new Update_date();

      x.updateStartDate(??);//how to send value in script include

sample script include code:-

updateStartDate: function ()

{

    how to fetch those value come from BR

},

3 REPLIES 3

Inactive_Us1474
Giga Guru

pass variable names in function call and add arguments in function declaration


var x=new Update_date();


var a=13;


      x.updateStartDate(13,a);//how to send value in script include



sample script include code:-


updateStartDate: function (num1,num2) //something like this


{


    how to fetch those value come from BR


// use num1 and num2;


},


Check out Chuck's Video on the Topic of Script includes.


Script Includes



Hope it helps


Akhil


Ankita19
Tera Guru

Check this Article:

https://community.servicenow.com/community?id=community_question&sys_id=a600c321db98dbc01dcaf3231f961905