How to Get Record sys id ATF

John Doe
Giga Expert

Hi I am working on ATF, where I have Open a Record in List step, after that step I need sys_id of the record opened in Open a Record for  run server side script.  

I tried 

var test = steps('sys_id').record_id;

stepResult.setOutputMessage(test);

Its showing output as 

undefined

 

Please help

1 ACCEPTED SOLUTION

@John Doe 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Hi,

Open an Existing Record doesn't have any output variable associated with it OOB

So you cannot get record from that

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@John Doe 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

John Doe
Giga Expert

can you suggest any other way

Hi,

It would be nice if you share what you wish to test using ATF so that correct steps can be mentioned

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I am also facing similar issue please find below steps. after step 6 i want to convert incident sysid to number.

1. Open a form in table(custom table)

2. set field values

3. Submit form

 

Once i submits the form it will create incident in incident table

 

4.navigate to module(incident table)

5.Record query (able to open incident which is submitted in step 3)

6.open an existing record