Due to a large data migration which involves moving records from one object to another, I am currently migrating Chatter feeds from one record to another. I am using a method which was told to me by some great members on here. I put it into instructions in case anybody needs it. I'm sure this is old knowledge to many of you but I just thought it would be good to have on this site anyway. (thank you @sfdcfox and @dunc44 with all this)

How to migrate a master record and its Feed data to a new object through DataLoader :

  1. Create a new External ID field in the destination Object named OrigRecordID__c
  2. EXPORT master records to a .csv file (OrigMasterRecs.csv)
  3. INSERT OrigMasterRecs.csv file into destination Object, and map the OrigRecordID__c field in destination Object to the RecordID column in the spreadsheet
  4. EXPORT the newly inserted records to a new file (NewMasterRecs.csv)
  5. EXPORT FeedItems from original Object using the OriginalObjectName__Feed object found in DataLoader after clicking Show All Salesforce objects checkbox
  6. Create a NewParentID column in OrigFeedItems.csv
  7. Do a VLOOKUP mapping from the ParentID column in OrigFeedItems.csv to the OrigRecordID column of the NewMasterRecs.csv spreadsheet and pull the corresponding value in the RecordID column of that NewMasterRecs.csv file and put those values into the NewParentID column of the OrigFeedItems.csv file.
  8. INSERT OrigFeedItems.csv, and map ParentID field of FEEDITEM object to the NewParentID column

This method works very well. However, I have come across a problem moving the feed Comments (FeedComments) to their proper new FeedItem parents in the new master records. It should be a case of just repeating the above process since it's just a matter of moving more master records with their detail records. However, unlike the above method I am unable to create a field (OrigRecordID__c above) to use in a VLOOKUP in order to map the old FeedItem recordID to the new PARENTID because the FeedComment object is not accessible to put a new field into.

Does anybody know of a way around this ? Is there a way to access the FeedComment object in order to put a new field into it ? I tried using Eclipse, but that would not work. Anybody have any ideas on a possible other method...?

Thank you for all your help.

2 Answers 2


What do you mean by the FeedComment object is not accessible. You should be able to access it.

In an execute anonymous window try this

 list<FeedComment> fComments = [Select Id, FeedItemId, CommentType, CommentBody From FeedComment limit 25];

What results do you get.

You should be able to extract the feedComment objects and reparent them in the same way that you have described above. Where exactly are you hitting an error?

  • When I said it wasn't accessible I meant I couldn't pull it up and put a new field in it. At least I don't think I can....?
    – Zoom_v
    Commented Sep 20, 2013 at 21:24

I have found a solution to this. A new field for the original Feed ID does not need to be added to the FeedItem object. Instead, we can import the FeedItem records and then use the Success file which was created by it by doing this :

After you have exported the FeedItem data you will rename the "ID" column to "OrigID" in the csv file created.

Now import that csv file (changing the Parent ID column using the process I talked about above). Your Feed data is now mapped to the new parent records.

Now open the success file which was just created. It will have the OrigID and an ID column which was just populated which is the new record's ID.

Now export the Comments.

Use the VLOOKUP method I mentioned above, match the ParentID column on the Comments csv file to the OrigID column in the success file - and grab the corresponding ID column cell value.

You now have the new Feed record ID. Import the Comments into Salesforce, mapping the new Feed record ID to the ParentID field during the import process.

That's it. The comments will now show up under the proper Feed entry.

You must log in to answer this question.

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