- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 11:17 PM
I am trying to close a change management task which requires a mandatory attachment.
i tried using
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 01:59 AM
I think second id would be dynamic as it ATF creates dummy records. So, i think first you should query the change_task record by the Record Query Step and then run add a Run Server Side Script step to copy the attachment to the change_task record.
You can use this in that step:
var change_task_id = steps('record_query_step_sys_id').first_record.toString();
GlideSysAttachment.copy('change_request', '500ad86c4fdeaf48e18d82818110c73a', 'change_task', change_task_id );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 12:41 AM
Hi Ijaazops,
It seems like GlideSysAttachment is server side API and will not support in client script.
Try doing the same by business rule. following code may help you
var att_rec_sys_id='818885b6dbe4ab000b928b4b0b9619cc';//KB0010005
var problem_rec_sys_id=current.sys_id;
GlideSysAttachment.copy('kb_knowledge',att_rec_sys_id, 'problem',problem_rec_sys_id );
Please mark helpful or correct if it is a answer to your query.
Thanks,
VM1104
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 01:45 AM
Hi VM1104,
What does the "current.sys_id" indicate. is it the sysid of the change_task form?
Thanks
Ijaazops