1

I have a Site User who accesses records through a VF page. I am encountering a strange problem where, Files uploaded in Lightning is visible but not the files those were uploaded in Classic.

When debugged, SOQL query is returning all in Execute Anonymous, but Debug Logs show only limited (uploaded in Lightning).

List<ContentDocumentLink> docList = [select ContentDocumentId, ContentDocument.title from ContentDocumentLink where LinkedEntityId =:recordId];
system.debug('docList: ' + docList);

I found that there is "working as designed" behavior while deleting a File - Lightning vs Classic - https://help.salesforce.com/articleView?id=000270734&language=en_US&type=1. Wondering if my issue is similar to this issue!

Any idea how to solve this? More importantly any idea why this is happening?

6
  • 1
    In classic may be they are uploading file in Attachment. Did you checked that? Apr 24, 2018 at 8:31
  • Yes, I am uploading in Files only. We have removed Attachments related list. I uploaded same file in both Lightning and Classic, when viewed only Lightning uploaded files are shown for the user in Site.
    – goabhigo
    Apr 24, 2018 at 9:10
  • 2
    Not exactly but similar issue I was getting, issue was when we were uploading the file from Classic, "Visibility" fields was not being assigned correctly on ConentDocumentLink (developer.salesforce.com/docs/atlas.en-us.api.meta/api/…) and this field is responsible for it's visibility. Can you please check on that. success.salesforce.com/issues_view?id=a1p300000008YruAAE
    – Ayub
    Apr 24, 2018 at 9:32
  • Thanks Ayub. I had gone through these to double check the property differences between files. To my surprise they are all exactly same (ShareType=V, Visibility=AllUsers)
    – goabhigo
    Apr 24, 2018 at 9:44
  • 1
    Maybe on the ContentVersion object - you have the ContentLocation field: 'S'=within Salesforce, 'E'=External Apr 24, 2018 at 12:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.