douglascayers / sfdc-convert-attachments-to-chatter-files

📎 Easily migrate your Attachments to Salesforce Files.
https://douglascayers.com/2015/10/10/salesforce-convert-attachments-to-chatter-files/
BSD 3-Clause "New" or "Revised" License
73 stars 29 forks source link

Do not share 'Private' notes/attachments upon conversion #5

Closed douglascayers closed 8 years ago

douglascayers commented 8 years ago

The classic Note and Attachment objects have a Private field that denotes whether that record is readable by anyone with read access to the parent record (public) or just the owner and administrators (private).

The current conversion code does not take this into consideration and all converted Notes/Attachments share read access with any user with at least read access to the parent record.

The conversion code needs a new parameter to control this behavior, whether the sharing should respect the Private field or not. If the code respects the Private field then the newly converted Note and File would note explicitly grant sharing to users with read access to the original parent record; it would literally become a private Note or File owned exclusively by the original owner. After conversion, the owner or administrators may grant further sharing as appropriate, even back to the record if desired.