Copy attachment from one instance to different instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours 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
5 hours ago
Hi @Pradeepa B ,
- Source Instance: Create a script (e.g., a Fix Script or Scheduled Job) to find the attachments for cmn_location and use RESTMessageV2 to make API calls to the target instance.
- Target Instance: Ensure the REST API is set up and authenticated, and the user has permissions to write attachments.
- Authentication: Both instances must be authenticated with each other. Basic Authentication or OAuth is required. Basic Auth is simpler for one-time scripts.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Go to sys_attachment table and filter by table name cmn_location. If you want to perform manual activity, you can export XML or export set and import it in target instance under same table sys_attachment.
You can automate this via Flow or Export Set as well but if it is a one-off activity, manual steps would be the ideal way to do it.
If this 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
5 hours 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
52m ago