- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 07:28 AM
Dear All,
I am currently creating ATF steps for splitting a remediation task but I have encountered some errors. It's either that my script doesn't open the table or it can't edit the short description of the record.
The previous step of this is a Record query of the remediation task I created.
What could be the reason the script is not working?
(function(outputs, steps, stepResult, assertEqual) {
var gr = new GlideRecord("sn_vul_action_split_vg");
gr.get(steps('27a02cb7973c7590481abce3f153afd7').first_record);
if (gr.next()){
gr.setValue('new_vg_short_desc','test split from script');
gr.update();
}
})(outputs, steps, stepResult, assertEqual);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 05:47 AM
Hi @jessa23 ,
Greeting!
Please try the below script
(function(outputs, steps, stepResult, assertEqual) {
var gr = new GlideRecord('sn_vul_action_split_vg');
gr.get(steps('27a02cb7973c7590481abce3f153afd7').first_record);// make sure provided sys_id of step associated with same test
gr.setValue('new_vg_short_desc',' test split from the script');
gr.update();
})(outputs, steps, stepResult, assertEqual);
I hope this helps!
Regards,
Hemant
**Please mark the appropriate response as the correct answer and helpful, This may help other community users to follow the correct solution.**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 05:47 AM
Hi @jessa23 ,
Greeting!
Please try the below script
(function(outputs, steps, stepResult, assertEqual) {
var gr = new GlideRecord('sn_vul_action_split_vg');
gr.get(steps('27a02cb7973c7590481abce3f153afd7').first_record);// make sure provided sys_id of step associated with same test
gr.setValue('new_vg_short_desc',' test split from the script');
gr.update();
})(outputs, steps, stepResult, assertEqual);
I hope this helps!
Regards,
Hemant
**Please mark the appropriate response as the correct answer and helpful, This may help other community users to follow the correct solution.**