Here is example of getting an attachment from an existing record and creating new record with the attachment.
In your case, the write new record would be with ARServerUser for your other instance to complete the attachment
from one system to another system process.
//make the call to remedy to get an entry object
Entry e = svr.getEntry(<yourForm>, <anEntryId>, null);
//get actual content of attachment by getting blob for attachment field
byte content = svr.getEntryBlob(<yourForm>, <anEntryId>, <yourFieldId>);
//get just the attachment value from interesting attachment field
AttachmentValue attachValue = (AttachmentValue)e.get(<yourFieldId>).getValue();
//set content with the byte array from getBlob
//Then just do create Entry with new Entry object containing
Entry newEntry = new Entry();
newEntry.put(<yourFieldId>, new Value(attachValue));
//add any additional field values here
//then write to new record
Hope that helps 😊
From: ARSList <email@example.com> on behalf of LJ LongWing <firstname.lastname@example.org>
Sent: Friday, December 15, 2017 9:54:56 AM
Subject: Re: Transfer attachment from one AR Server to another AR Server through Java API
To retrieve an attachment from the source server you need to do two calls, one from an entry perspective to get the file name and size, and another from a getblob to get the actual attachment info....then when moving the attachment to the remote system you need to do the opposite setBlob....I don't think you then need to do the setEntry....are you doing the setBlob on the destination system?
On Fri, Dec 15, 2017 at 7:42 AM, Narayanan, Radhika <email@example.com> wrote: