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

Salesforce System Error: 208410828-86802 (1615802660) #14

Closed gaborarany closed 7 years ago

gaborarany commented 7 years ago

Hello Doug, I am having an issue with conversion and hoping you can help me. When doing a test conversion (all records, ~26000) in the sandbox, the apex job hangs at one point, stays like that for a couple of hours and then errors out: Salesforce System Error: 208410828-86802 (1615802660) (1615802660)

I've contacted SFDC support to figure out what this error means and they advised that this is the same error when the note contains HTML or invalid characters. Unfortunately, no log is created about the problematic record. Would there be a way to pinpoint what record is causing this problem? Thank you in advance! Gabor

douglascayers commented 7 years ago

Hi @gaborarany,

Thanks for trying my conversion tool, sorry you ran into an issue. Unfortunately when Salesforce errors out like that it tends to be fatal error and code isn't able to complete a transaction to save off any logs.

Another user, Rachel Park, said on Success Community that she had to export all the Notes via Data Loader, replaced special characters in the spreadsheet, then updated the Notes back in Salesforce. You might ping Rachel on Success Community or follow up on this thread to see what specific changes she had to make.

Until people provide me samples of the Notes with the kinds of special characters that are failing there isn't a whole lot I can do in the code to help prevent the error. I do do some special character handling but obviously there are some characters I'm not catching.

Doug

gaborarany commented 7 years ago

Hello Doug, Thank you for your response. I would still like to use your tool for migration :) I will try to find the problematic notes by narrowing down the notes to be converted. If I can find the problematic characters, would you be able to add handling them in your code? Thank you again!

douglascayers commented 7 years ago

Yes @gaborarany, if you find the problematic characters please let me know and I'll update the conversion tool.

I'll go ahead and close this issue for now, but feel free to comment back with any new info you find.

Thanks! Good luck!

gaborarany commented 7 years ago

Hello @DouglasCAyers , I did some tests using the data loader method to figure out what was causing the issue. What I've found that the notes that had an empty body also gave the HTML/non-escaped character error. Apparently inserting nothing/space/line feed character will not do the trick, but an nbsp does. Hope you can consider this, and add it into the code. Thank you in advance!

douglascayers commented 7 years ago

That's a great find, thank you! I'll update the code for next release to handle this edge case. Thanks!

certifycrm commented 7 years ago

Hello @DouglasCAyers I ran your tool yesterday to convert all our notes. It stopped dead at 3,000 records. Turns out record # 3001 had a copyright symbol in the text of the note. This was enough to make it fail and not process the rest of the records. Downloading the remaining notes (including body) via Data Loader and searching for the (c) symbol and then creating new notes with and without the symbol and then submitting the single parent record for conversion was how I finally found and isolated the problem. I rescheduled the job and the remaining 2,093 notes were converted. Thanks for this great tool Doug it has really helped. Next is the Files conversion using your other tool. Before the end of the month we will be rid of Notes & Attachments.

douglascayers commented 7 years ago

Thanks @certifycrm, this is great info. I'll make sure to include this with the special character conversion code.