While we are able to export other objects, and can see Notes in the system under Contact records, Data Loader exports only headers and no records under Export All. We are using the "Notes" and "Files" related lists due to deprecation of Notes and Attachments. Thanks.
[SalesForce] Data Loader not exporting notes despite records in system
Related Solutions
2013-06-11T15:54:00Z is GMT The Z at the end signifies Zulu which is UTC or GMT All times are stored in the database as GMT times and then corrected for display based on the Users Timezone
So you can either convert to GMT and then query 2013-06-11T13:54:00Z (GMT = CET - 2?)
Ultimately, only Salesforce can explain exactly what that specific gack message means. However, it appears to have to do with a misunderstanding about attaching the ContentNote records to parent files.
The OwnerId
field is the User who owns the Note, not the record to which it is attached. You're not required to populate this field. In fact, it's often ideal to allow Salesforce to populate the field based on your data load user, if you use an "Integration User"- or "System User"-type model. This can be helpful because of the unique permission structure on Content objects, which can result in you being unable to access or modify the inserted records immediately after you assign ownership to another user.
Rather than populating a parent object Id in the OwnerId
field, in order to attach the Note to a record, you need to perform a second Data Loader pass to insert ContentDocumentLink
records.
ContentDocumentLink
acts as a junction object between the ContentNote
and the various locations where it may be shared. (When working with Content objects, you can generally treat ContentNote
and ContentDocument
as equivalent. ContentNote
abstracts away some of the complexity around adding versions and extracting their document Ids to add links).
Salesforce has detailed instructions on how to perform these two data-load passes. Basically, you'll get your success file back from Data Loader after inserting the Notes (which, after the first step, are not linked to anything) and then use it to construct the second load file (for ContentDocumentLink
).
You treat the output Id
column of the inserted Notes as the ContentDocumentId
field of the ContentDocumentLink
. You then have to populate a couple of other fields to define the share type - see the documentation for more (sometimes confusing) details, but I've found that the appropriate solution is to set ShareType
= "I"
and Visibility
= "AllUsers"
. Lastly, you put the parent Id in the LinkedEntityId
field.
One way to simplify your process here will be to include all of these columns (ShareType
, Visibility
, and LinkedEntityId
) in your original import file. You'd simply not map them in the first load pass. Then, when you open your success file, each inserted ContentNote
Id would still be clearly associated with its desired LinkedEntityId
. By simply changing the Id
column that Data Loader outputs to ContentDocumentId
, you could feed that success file straight into Data Loader's column auto-match for a ContentDocumentLink
import.
I have written an open source package to support bulk imports of Content Notes, which might be useful or an example.
Best Answer
This means You have enabled the advanced note and content files. Once this is enabled in your organization, Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments.
Notes related list will always upload ContentNote object i.e. advanced notes. Notes via Notes and attachment will create the record in Note object. Both are different.
So, While exporting you need to execute the export on the ContentNote object. The ContentNote object will contain all the notes that have been uploaded via Notes related list.
You can browse these links for more details:-
Update:-
Hope it helps you.