I have two custom objects objA and objB. I want to transfer all the records available in objA to objB. For this purpose i am using DataLoader to transfer the records. I want to transfer the records that have Notes and Attachments also. How to transfer the attachments one object to another. After transferring the records from objA to objB, automatically records ID and Name(Name auto generated in my case) will change. Attachment parent ID related to objA, but in objB it is changed. How can we identified which attachment is related to which record. Can anyone suggest me.

1 Answer 1


You cannot transfer attachments, you have to create new ones.

  1. In data loader, move all records from object A to B (keeping a column for the old ID)
  2. In the attachments csv, do a lookup to the results file to find the new Parent ID based on the old Object A ID and Parent ID
  3. Insert the attachments using the new parent ID

See this help document on uploading attachments using data loader and org data export.

  • After importing attachments from Attachment object we will get all the attachments available in all objects. How can we identified which attachment is related to our custom object "objA". And if we have n no.of attachments in "objA" finding new parent id using csv file little bit time taking process. How can we simplify this. Aug 10, 2015 at 5:14
  • No other way I know of. It is not that hard, a lookup takes like 5 minutes to do..You could always write the obj B id to the object A record, then use code to move the attachment based on that id
    – Eric
    Aug 10, 2015 at 5:15
  • I am exporting attachments from Attachments object with Body, ParentID, Name, OwnerID columns. I changed ParentID with newly inserted records. I am trying to insert attachments with same csv file what i exported, but it giving the error "csv file format not supported". The csv file contain the long text in body column. In your given link it showing the body will filling with path. Is it necessary to download the attachments to our system and giving the path. Aug 10, 2015 at 7:06
  • @VijayKumar - Not sure if it is "Required" but I know it works...
    – Eric
    Aug 10, 2015 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .