How to transform attachments from variable section to top of the RITM?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025 08:40 AM
Dear Team,
We have two variables(type is attachment) in one of the catalog item, whatever the attachments was attached here,
Same attachments should also get attached at the top of the RITM(refer the attachment). This will only applicable to the same catalog item only. Kindly let me know.
Note: Should only use workflow and will applicable to same catalog item only.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025 08:58 AM
Hi @Sanjay33 ,
Create a run script activity in the workflow with following script.
or use this script in a BR on sc_req_item with conditions added
var saGr = new GlideRecord('sys_attachment');
saGr.addEncodedQuery('table_name=ZZ_YYsc_req_item^table_sys_id='+current.getValue('sys_id'))
saGr.query();
while(saGr.next()){
saGr.table_name = 'sc_req_item';
saGr.update();
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya