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

Batches are failing #31

Closed danhowellnz closed 6 years ago

danhowellnz commented 6 years ago

Great tool. Saved me a lot of time with data migration.

It seems successfully process a 1-3 batches and then stop. I have tried batch size of 1 and it processed 4 records. Batch size of 5 and 10 records. There are no triggers or automations.

danhowellnz commented 6 years ago

I installed the code, the debug logs say "FATAL_ERROR Internal Salesforce.com Error" on the "SerialBatchApexRangeChunkHandler"

danhowellnz commented 6 years ago

Sorry for all the comments. It seems to be special character, but no errors are in the logs. hasn’t signed Referrer’s agreement) but seems to be a good contact –

D-McGovern commented 6 years ago

I ran into this as well, wound up exporting to a spreadsheet and using regex to pare it down into what I needed to retain and know will process. This worked well for me: =ArrayFormula(REGEXREPLACE(A1:A, "[^a-zA-Z0-9 /@$.-]+", ""))

douglascayers commented 6 years ago

@danhowellnz @D-McGovern Yes, this is the single most frustrating part about notes migration is that Salesforce does not provide any meaningful error messages when the creation of ContentNote fails due to invalid characters.

Thanks for the regex on replacing special characters.

I'm going to go ahead and close this issue as it sounds like the problem was invalid characters, which you identified and replaced.

douglascayers commented 6 years ago

I have future plans to try and detect such scenarios. If I get it working it will be covered by https://github.com/DouglasCAyers/sfdc-convert-notes-to-chatter-notes/issues/24