3

We are migrating to lightning experience.

I have not enabled the Files object use because we are using Attachments and we have pages developed that use the Attachment object.

I have found out that when my users are uploading files through the lightning experience UI (the Upload File button on the Notes & Attachments related list), they are uploading as Files records and not as Attachments:

enter image description here

This is a problem for us because these files are hidden from our developed pages.

Is there any solution or workaround for this behavior?

Thanks

Itai

4 Answers 4

4

Real answer here is:

Attachments cannot be uploaded via lightning experience UI !!!

1

I had a similar issue with attachments for a custom object being attached to account (in a master-detail relation). Attachments were supposed to be visible only to the community members / contacts being related to a their account.

Attachments - uploaded in classic - are visible in a community but files being not visible when uploaded with the "Upload Files" button in Lightning Experience. It turns out that attachments share their parent object sharing rules. Files uploaded via Button seem to have their own sharing rules independent from the object they beling to (which is a critical limitation in my view).

As attachments have their limits and are deprecated we successfully tried to upload the files per Chatter after activating chatter for the custom object we wanted to upload the files to. Files attached to chatter posts on that specific custom object appear as files for that object and are visible e.g. in communities as well.

maybe these two ways work for you as well - X

0

It's would be better if you start using Files in lightning.

As per new release of spring 17, In Lightning, Salesforce is going to replace Notes and Attachment section with Files.

So it's better you modify your application with Files. For more details go through spring 17 release notes.

3
  • Thanks, but I have a bunch of legacy code that I do not want to refactor for that, and it will be replaced at end of the year anyhow. I am looking for a temporary solution so my users could work for now... Mar 26, 2017 at 12:09
  • I don't know if there is any workaround for this. I think @sfdcfox can suggest any workaround. Mar 26, 2017 at 12:15
  • @sfdcfox help please!!!! Jul 11, 2017 at 18:49
0

Attachments are deprecated in lightning. Per the docs they are still viewable, but not searchable.

https://help.salesforce.com/articleView?id=Attachments-are-not-returned-in-Lightning-Experience-search&language=en_US&type=1

You could write triggers on attachments to convert them to files. But better would be to update your code to use files.

Doug Ayers wrote some triggers as part of his batch jobs to convert existing files to attachments. This might be helpful for you

https://douglascayers.com/2015/10/10/salesforce-convert-attachments-to-chatter-files/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .