[SalesForce] How to move/migrate old notes to new Notes

With the new Notes, my users complain that they want all of their old notes in the new format.
Knowing dataloader, I am trying to export all of the old notes and insert as new Notes, but I can't find the note (old) object in the scheme, or how to insert to the Notes.

  • Schema builder shows me nothing of Notes, or the old note

  • I looked at the NoteAndAttachment object (I think all the old notes are there), but this item can't be queried

enter image description here

  • I believe ContentNote is the new Note object, so an insert with dataloader is easy. And to attach to the correct object is through AttachedContent – but this object is read only, so how?

    1. How do I export all the old notes and their relations?
    2. How do I insert the old data as new Notes to the correct related parent object?

Best Answer

To help folks migrate from Classic Notes (Note) to Enhanced Notes (ContentNote) I've developed open source project on GitHub:

https://github.com/DouglasCAyers/sfdc-convert-notes-to-chatter-notes

And if you're converting notes you might also want to convert Classic Attachments (Attachment) to Salesforce Files (ContentVersion):

https://github.com/DouglasCAyers/sfdc-convert-attachments-to-chatter-files

The conversion is done entirely in Apex and handles sharing via ContentDocumentLink the new note/file (ContentNote/ContentVersion) with the original parent record.

Related Topic