File Upload to Salesforce Files instead of Attachment?

  • 2
  • Question
  • Updated 1 year ago
  • Answered
Since Salesforce is phasing out Attachments in favor of Files, is there a way for the File Upload component to upload to an Object's Files?

I assumed that updating the Files Settings would trick the Skuid component into placing the upload into Files, but nothing gets past Skuid!

ContentDocument is the object that represents Salesforce files. I can easily view ContentDocument records related to an object but I cannot create them. Does anyone have a workaround to create ContentDocuments on a record through Skuid?
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb

Posted 1 year ago

  • 2
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb
Nosa,

You can upload to chatter files in Skuid and create a ContentDocument and a ContentDocumentLink to that file that you can see in Skuid. Below I have my file upload component settings on my Account page uploading 'in Chatter Feed Item'. (This will create a content document!) The parent model is the Account model that is running for my detail page. 

Lastly, I like to show a table of the object ContentDocumentLink where LinkedEntityId = the main model's Id. That shows any ContentDocument where I have a related ContentDocumentLink record with it. I am on Banzai in this screenshot below. 

 

Hope this helps get you started. 

-Jeff Rutter
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Photo of Nosa Osai

Nosa Osai

  • 398 Points 250 badge 2x thumb
Thanks, Jeff! That works perfectly.

And thanks Raymond for the supplemental info!!
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Nosa & all,

Jeff, Thanks for sharing that workaround!!!

Currently, there is the option to have the file upload component attach something to the content document object but this is only if you do not select a parent model. 
 

BUT, be on the lookout for changes with this functionality (and the documentation to support it) when Millau comes out on in two weeks on October 31, 2017!!! We will update this community post when the Millau release is publicly available ... 

Thanks!
Karen
Photo of Jaime

Jaime

  • 1,220 Points 1k badge 2x thumb
Do you need Chatter  enabled in the org to get this to work?  I get this message "This feature is not currently enabled for this user."  Is there a way to get this to work without Chatter being turned on in the whole org?
(Edited)
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
For upload to chatter you need chatter enabled at org and chatter feed enabled on the object.
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
We really appreciate your suggestion about inserting ContentDocuments related to records. It has been implemented and is now available in the Millau release, now available from the Skuid Releases page at http://www.skuid.com/skuidreleases. As a reminder, Salesforce does not allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade. Thanks again for helping Skuid become an even better product!

Please review these release notes regarding this feature (and other changes and improvements in Millau).
https://docs.skuid.com/latest/en/release-notes.html#salesforce-notes-attachments-versus-files