Retrieve attachment from RITM to the import set staging table and transform records to Target table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I would like to know how i can retireve RITM attachment to the import set staging table and then transform records accordingly to target table. and finally i need to archive this loaded attachment imprt set row into archive folder.
Currently Im working on Hardware Asset Management scope.
Im using below BR script(On After insert/update) but got to know few methods/APIs like GlideSysattachment() wont work in some scenarios.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Use a script or query to get the attachments linked to the RITM:
use Attachment API to download and re-upload it to the staging record.
Flow Designer - We have OOTP copy attachment function Use it
Use Below API
var attachment = new GlideSysAttachment();
attachment.copy('sc_req_item', ritmId, 'your_import_set_table', importSetRecord.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what's your actual business requirement?
You want to fetch attachments from RITM and do what with them?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I need to bulk upload assets into hardware table, So once the catalog item is submitted with attachment, it generates an RITM. So here, I need to get that attachment from RITM, and process further to upload all the records in attachment into target table(Hardware). For that Im trying to do via import set staging table and Transform records into target table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
1) so user submits catalog item with lets say 5 files, it created RITM and adds these 5 files to RITM
2) how is this RITM linked with hardware table?
3) are you having any variable referring to hardware table in your catalog item?
4) if yes then are you saying those 5 files you want to add to that Hardware record selected in the Reference variable?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader