2

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?
2
  • I guess schema builder runs on older version or API .Try to query in workbench and see if it works. Commented Jan 26, 2016 at 10:48
  • 1
    I've put together code for converting Notes > ContentNotes and Attachments > ContentVersions you might find helpful: douglascayers.com/2015/10/10/…
    – Doug Ayers
    Commented Mar 12, 2017 at 23:02

2 Answers 2

2

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.

1
  • Hey Doug ! thanks for this awesome tool - i just tried and it works for handful of records. I is failing however for 4000 that I tried - with the: First error: Too many SOQL queries: 201 error in the batch apex job status. Can you help us with that?
    – peevesy
    Commented Feb 17, 2021 at 2:07
0

Data loader can export all your old notes. I used Note as object. Reuse the parent Id.

The import csv cannot contain the note body in the csv. It's kind of like uploading attachments.

Because ContentNote is based on Salesforce CRM Content functionality, the Content column must contain a path to a local file. The body of the note may not be contained within the CSV file.

Salesforce on importing to new Notes, aka, ContentNote

Other info with an import tool ...

importing Notes etc

You must log in to answer this question.

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