Vaibhav
Giga Guru

Hi Sanna,

You can use previous step sys_id to get submitted record sys_id by following way.

var STEP_SYS_ID = '6989f601376023008020036973990ebc';   // Your Submit form test step sys_id

var record_sys_id = steps(STEP_SYS_ID).record_id);  // get submitted form record sys_id

Mark it correct/helpful if it helps you

Regards,
Vaibhav Chaudhari