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
Jonathan Wolff 7Jonathan Wolff 7 

Querys for ContentDocument for files on custom object List

Hello friends,

I have following requirements. Have a custom object "Mediathek" with a List "Printmaterial". I want to make a datatable that shows the list of all Files in this List. I want the File name, the number of downloads and Views. The problem is, that I do not know how the querys for ContentDocument/Version should look like to achive this. Could you give me the Querys to get the data I want.

Thank you in advance :D

Sincerly,
Jonathan
AnkaiahAnkaiah (Salesforce Developers) 
Hi Jonathan,

Please refer the below will help you to proceed further on your requirement.

https://salesforce.stackexchange.com/questions/160198/relationship-between-contentversion-object-and-document-object

If this helps, please mark it as best solution.

Regards,
Ankaiah Bandi