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

Enhanced Note Created By is not the same as original Created By #26

Closed asitu14 closed 6 years ago

asitu14 commented 6 years ago

I used your tool to convert my notes to enhanced notes and for some reason, the original “Created By” and the new enhanced note “Created By” do not match. I'm not sure why?

image

asitu14 commented 6 years ago

Hi Doug,

Was wondering if you've had a chance to review my issue yet? Thanks for your help!

douglascayers commented 6 years ago

Hi @asitu14,

Thanks for the screen shot. For those following along at home, this issue is related to this earlier conversation on my blog post: https://douglascayers.com/2017/05/08/convert-notes-to-enhanced-notes/#comment-3816

Could you tell me who the owner is of the original Note in the "Notes & Attachments" list? My guess is Peter Burke (who is shown as the Created By in the new "Notes" list) is the owner of the original note also.

Thanks,

Doug

asitu14 commented 6 years ago

Original: image

Enhanced: image

asitu14 commented 6 years ago

The original Created By indicates Boris Perlin but the new enhanced note shows Peter Burke. Was this by design? You were correct about the the original owner was - Peter Burke - and this reflected in the new enhanced note too.

douglascayers commented 6 years ago

Thanks for the confirmation. Yes, by design the Owner of the original Note becomes the Owner and Created By of the converted Enhanced Note.

This is because Salesforce requires when we create Enhanced Notes (ContentNote object) that both the Owner and CreatedBy be the same person. And since the Owner field is something users can change on their records that gave the most flexibility if the admin needed to swap out for an active user or different user than the original CreatedBy.

99% of the time the original note's Owner and CreatedBy are the same but sometimes they are not.

In your case, I recommend changing the Owner of the original Notes to be the desired CreatedBy of the converted records then run the conversion. I know it's a bit unintuitive, sorry.

If you have already converted notes in your production org and you need to re-convert them after changing ownership then simply delete the converted enhanced notes then re-run the conversion.