How to Create attachment with same sys_id

Harsha Reddy
Tera Contributor

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

11 REPLIES 11

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.

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.

Do you have any reference document GlideUpdateManager2 api how to use this?

https://servicenowguru.com/system-definition/manual-update-set-inclusion/

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.

We can't go this approach, if possible can you please suggest and any method

Mark Manders
Mega Patron

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