0

I need help, I'm trying to create a folder explorer in apex class and visualforce, it's when I want to copy a file in the folder, I can chose the folder or the sub-folder where I want to put my file in salesforce.

I tri this code bellow, but I have an error

enter public class selectFolder {
    public List md{get;set;}
    public selectFolder(ApexPages.StandardController Account) 
    {
        md = new List();
        md =  [Select Id,Name,(Select Id,name,(Select id, name from ContentFolderMember) 
        From Folder__c)From ContentFolderMember];
         List documents = [SELECT Id, FolderId, Folder.Name FROM Document 
        WHERE Folder.Name like 'ourLogo%' LIMIT 1];    
      } 
}

The error I have is this "

Select Id,Name,(Select Id,name,(Select id
          ^
ERROR at Row:1:Column:11
No such column 'Name' on entity 'ContentFolderMember'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

I did some research and I fine some topic talk about ContentDocuments, ContentFolder or ContentDocumentLinks, but I have no idea how it's work. Thanks in advance.

2
  • You're going two children deep, which I don't think feasible in salesforce. Instead, have one more loop – Ysr Shk Jul 25 '20 at 13:11
  • Thanks Ysr Shk! How I can use a loop in this case? – Khalfe Jul 26 '20 at 14:33
0

There is no name on content folder member. There is a content parentfolderid which links to the content folder

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.