How to call mid server script include.

guptashalini041
Kilo Contributor

How to call the MID server script include - AmazonWebServicesRequestSigner. This is available in CloudAPI application.

How can I test it using scripts - background?

find_real_file.png

3 REPLIES 3

Raj68
Mega Guru

Hi Shalini,

 

hope below link will help you

 

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

NOTE: Mark correct or helpful if it helps you.

Warm Regards,

Raj patel

 

Ujjawal Vishnoi
Mega Sage
Mega Sage

Hi Shalini,

Please refer the below mentioned sample code.

var jpr = new JavascriptProbe('<name of the mid server>');
jpr.setName("testcopypoc");
jpr.setJavascript("var req = new cpy(); req.prnt();");       //cpy1 is mid server script include name and prnt is the function in include
jpr.addParameter("<parameter>", '');   //if you want to pass parameter to mid server
jpr.addParameter("skip_sensor", true);
jpr.create();

Hope this helps.

Regards,

Ujjawal