I’m currently working to prep our org for using Files rather than Attachments, including in SKUID models and components but am running into some roadblocks. We have a table that the end user needs to essentially “Clear Out” the file from the table (ideally delete, but simply being left off the UI via condition would be fine too as a workaround) once they have moved the file to a different record.
Files don’t allow someone who doesn’t own the file to delete it without Manage All Data (https://success.salesforce.com/ideaView?id=0873A0000003XWGQA2), so I figured a workaround would be to create a custom boolean field on the ContentVersion object that denotes they have reviewed and moved the file. The SKUID table would then have a condition that drops it off the list if the file is checked “True” for this.
However, I’ve tried it two ways and have two different issues preventing this solution.
1. ContentDocLink Attempt: When I try to use the ContentDocLink model/table, I can’t edit the custom field on the ContentVersion record via ContentDocLink Model. The files’ privacy are “Visible to Anyone with Record Access” and all users with access to the record can see them. But unless they own the file, they can’t delete it as mentioned before. And it doesn’t appear that the custom field can be edited from this table either, so the files are stuck on the table.
2. Content Version Attempt: When the model is based on ContentVersion, the custom “Reviewed” custom field is editable and the file drops off the table per the conditions once it is checked and saved. However, with this, I have a sharing issue. Even with "Visible to Anyone with Record Access” as the File Privacy, the file only shows up to users with access to the record if it was shared directly with them or they have View All Data permissions.
I’ve read through this: https://community.skuid.com/t/populate-custom-field-on-file-upload and this: https://community.skuid.com/t/update-record-created-via-the-upload-file-component, the former I’m going to dive into deeper but it’s from four years ago so want to see if anyone has other ideas. Please let me know if you have suggestions or have run into the same problem.
Question
ContentVersion/ContentDocLink Model Issues (Privacy and custom field editing not working as expected

Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.