Closed douglascayers closed 7 years ago
I recently spoke with Henry Liu, Product Manager for Notes, and this seems to simply be a limitation of the API. His and other teams are working to close the gap but no ETA as of now.
This is now possible at least with ContentVersion records when converting Attachments to Files. I will be updating the code base soon to reflect this capability.
Reported by Rick MacGuigan
The current way the notes and attachments are converted to chatter notes and files is pure apex, not the api, so the audit fields cannot be set even if the permission is granted to the current user running the conversion code.
Need to investigate if using REST API via callouts from the batchable apex will allow for the conversion to occur and preserve the audit fields.
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/
https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_input.htm#cc_upload_binary_files
https://developer.salesforce.com/docs/atlas.en-us.202.0.api.meta/api/