function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sudheer dasari 9sudheer dasari 9 

how we can reparent attachments & notes. using data loader

i have one object which contains 20 lacks of records with each record having 2 r more attachments, i need those records and attachments to copy another object, every thing is done except attachments can anybody suggest me.
Best Answer chosen by sudheer dasari 9
pranoti patilpranoti patil
Hi Sudheer,
Instead of manual mapping, you can map id's using excel vlookup function. But you have more than  20 lacks records, writing a custom code is better option. Just one suggestion, write your logic as such which will not hit any salesforce governor limits. 
 

All Answers

pranoti patilpranoti patil
Hi Sudheer,

You cannot reparent attachment and notes using data loader. This is a standard salesforce limit. 

One way to do this is
1) Export the attachments/notes from source object,
2) Change parentId to destination object id,
3)  Import the attachments/notes
4) Delete attachments/notes from the source object.

Here is an article. https://help.salesforce.com/articleView?id=000232475&type=1

Kindly mark it is as an answer if this resolves your query.

 
sudheer dasari 9sudheer dasari 9
Hi Pranoti,

Thanks for reply.
https://help.salesforce.com/articleView?id=000232475&type=1. this link won't  change parentid dynamically in step 3, we need to map manually, for lakhs of records we don't need to map right?. i want automatically change d parentId for that i am trying to do with batch class.
pranoti patilpranoti patil
Hi Sudheer,
Instead of manual mapping, you can map id's using excel vlookup function. But you have more than  20 lacks records, writing a custom code is better option. Just one suggestion, write your logic as such which will not hit any salesforce governor limits. 
 
This was selected as the best answer