Notes in Salesforce Lightning Experience

Notice that there are currently two different objects for notes in Salesforce:

  • The usual "Note" object.
  • "ContentNote" which is a relatively new object for taking notes also known as Enhanced Notes since they allow text formatting (Check ContentNote object reference for details).

In Lightning experience, if you create a new note directly from Salesforce, it will be using the ContentNote object. While the old Notes are not shown anymore.

How ContentNotes work

ContentNote object works slightly different than Notes. Instead of having a "Parent ID" field, it is linked to other objects (e.g. an Account) through a 3rd object called "ContentDocumentLink" (Check ContentDocumentLink object reference for details).

How to insert ContentNotes and link them to a "parent" object

In order to do this, you will need to separate tasks, first you will insert the ContentNote and then you will link the note to its parent object. The steps would be as below:

  1. Create an import task for object ContentNote.
  2. Map the needed fields (Content is the note body while Parent ID does not exist for this object) and run your task.
  3. Once the ContentNotes are inserted, create a new import task for object ContentDocumentLink.
  4. For this task, your CSV file should contain (at least): "Linked Entity ID" which will be the parent object id (e.g. Account ID), the "ContentDocument ID" which will be the ID of the note you inserted on first task and "Shared Type" which is a permissions setting which values can be "V", "C" or "I" (details on ContentDocumentLink object reference).

Once the 2nd task finishes running, you will find your notes linked to your parent object.

Suggestion to simplify your work

To reduce the number of steps we recommend that your initial CSV file created to insert the ContentNote already contains all the fields for the ContentNote and additionally the Parent object ID and the Shared Type. Those fields won't be mapped on the first task, although, once the first task finishes you can download the success file to use as input CSV file for the ContentDocumentLink since it will already contain all the needed fields as the "ContentDocument ID" will be the ContentNote ID which will be on the 3rd column of that success file.

Have more questions? Submit a request


Article is closed for comments.