How to Create attachment with same sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 03:25 AM
Hi Community,
I am doing the integration with between the two servicenow instances for knowledge management, in this case if i add the any attachment on knowledge article body, the same content should reflect into the target instance, in this case attachment sys_id should be same in the both the instances. In this case how we can create attachment on target instance with the same sys_id in the source instance. Someone please help me on this.
Thanks in advance,
Harsha Reddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:19 AM - edited 01-22-2024 04:20 AM
Yeah that's why I prefer to go with xmls and u can move those manually or throyfh update set using GlideUpdateManager2 api.
Please mark my answer helpful if it adressess your concern.
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:24 AM
Do you have any reference document GlideUpdateManager2 api how to use this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 05:21 AM
https://servicenowguru.com/system-definition/manual-update-set-inclusion/
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 10:17 PM
We can't go this approach, if possible can you please suggest and any method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 10:33 PM
Why do you need the same sysID's? If it's an integration, that integration is creating new records, so the sysID's will be different. Functionality will be the same though. The article will still have the same number and attachment. It shouldn't matter what the sysID is, right?
The already provided solution is the only one to have the same sysID on both instances (or just do a clone, but not sure if that's feasible). And if you keep insisting on having the same sysID, for reasons I am missing, you make sure you send over the sysID with your integration and have some transform script on the target instance to change the sysID of the attachment. Do realize that you run the risk of creating duplicate sysID's on your instance, although that chance is small.
O, and: manipulating sysID's is the worst practice of them all.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark