Copy attachment from one instance to different instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I need to copy attachment from one instance to different instance under table cmn_location.
Could you please help me on this requirement.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Bhuvan ,
The export and import functions are not working as expected. When I export an attachment and try to import it into another instance, I'm getting file in unsupported or corrupted.
I believe this issue is occurring because the export and import are being done across two different instances.
Could you please help me with some another way.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
you want to transfer files between instances right?
export import won't help here. you need to use REST Message and integration
if yes then check these links
Unable to send attachment via REST
Business rule to send attachment to 3rd Party Tool via REST
Send attachment via rest message
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
2 weeks ago
Import and Export will not work for sys_attachment table as you are not trying to move the records from one instance to another rather actual attachments from the record. When attachments are moved it will be in binary format and you cannot directly transfer the attachments from one instance to another
Refer below article for more details on how attachments are stored in instance
You need to use REST APIs or Custom action in Flow Designer to automate this. Refer below posts that can help with required scripts
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Did you get a chance to review this as I believe the information provided should answer your question
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
so do you want to sync attachments between Location records in those 2 instances?
what's your actual business requirement?
Usually we don't have any files attached to Location record as it's part of Core data in the instance along with other core tables such as Group, User, Department, Cost Center etc
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