function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sascha DeinertSascha Deinert 

ContentDocument and CustomObject


Hi,

I have a list of data which I have collected as following:
 
public List <MediaData__c> getMDList() 
{ 
List <MediaData__c> MDList = [SELECT Id, Description__c, Topic__c, FROM MediaData__c]; 
} 
return MDList; 
}

I've stored in the different MediaData records a files which I want to add to the MDList. The files are stored in ContentDocumentLink, the relationfield for the MediaData and the ContentDocumentLink is LinkedEntityId.

How can I add the fileinformation to the MDList?

Later I want to show the list at a visualforce page and a preview of the files.

Thanks,
Sascha