ATF - How to pass the Previous Step in the Run server-side script for CAB approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi, I am trying to pass the previous step in the sys id (Insert record) in the Run server-side script step. I am writing the script to Approve 60% of approvers in the CAB approval of change request to move next phase. Help me out its Urgent!
Error:
Test failed due to JavaScript error executing step:
java.lang.IllegalArgumentException: Step id 3 is not valid
Full logging from step execution:
09:11:22.858 Loading script: jasmine_lib/jasmine31.js
09:11:23.251 Successfully loaded jasmine_lib/jasmine31.js
code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
,
Use this format while reading the record in the 1st line of the code.
var changeSysId = steps('SysId of the Record insert step').record_id;
If my answer helped, please mark it as helpful or accept as the solution.
Regards,
Chidanand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
the function steps take the sys_id of the step of which output variable is needed. Hence you need to provide the sys_id of the step 'Record insert' in place of number 3 in the below line.
var changeSysId = steps(3).record_id + '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Ankush,
I tried that too, I got an Illegal attempt error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Did you try the solution I provided above?