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.

server side script for getting the record's sys_id from last step

admin11345_
Tera Contributor

Hi,

1) record a query with some specifications and
2) open that form(I mean record).

I have already written above 2 steps and now
3) I need to write the server side script for getting the record's sys_id which I have opened in step 2
how to achieve 3rd step(server side script) in ATF ?

1 REPLY 1

Ananta1
Tera Expert
If you want the string sys_id value then, you can do this -  
  var queryStepSysId = 'ec700b051becd0908a55a86dee4bcb24'; [Your first step sys_id, by right clicking on the step in test related list you can get it]
    var Id = steps(queryStepSysId).record_id;
outputs.u_output = Id;