douglascayers / sfdc-convert-notes-to-chatter-notes

📓 Easily migrate your Notes to Enhanced Notes.
https://douglascayers.com/2017/05/08/convert-notes-to-enhanced-notes/
BSD 3-Clause "New" or "Revised" License
26 stars 11 forks source link

Conversion is Simply not Happening #15

Closed Varun-Sharma-1981 closed 7 years ago

Varun-Sharma-1981 commented 7 years ago

I'm trying to do a test convert and have also enabled the trigger. Neither is working for me at the moment. Please help!

Varun-Sharma-1981 commented 7 years ago

This is the error I am getting in the logs:

Required fields are missing: [Expires_c]. I've realized that there is a custom field on the Content object with this name. How can we workaround this if we need to keep the field?

douglascayers commented 7 years ago

Hi @Varun-Sharma-1981,

Thanks for using my conversion tool. Hrm, custom required fields can be a problem for data migrations.

Here are some options to consider:

  1. Remove the validation that makes the custom field Expires__c required
  2. At the field level, specify a default value so no new ContentVersion records have this null
  3. Introduce a before insert trigger on ContentVersion object to default the value
  4. Rather than deploy the managed package of my conversion app, deploy the source code from GitHub then modify the ConvertNotesToContentNotesService apex class as needed

Thanks,

Doug