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
Yaman NeamehYaman Neameh 

Relationship ContentDocumentLink and Case

Hello,
I'm receiveing relationship error while querying for Cases Ids and their attached document Ids:

Select id, (SELECT Id FROM ContentDocumentLink) From Case limit 5

Can you please support me to run the above query in one statement?
Thank you
Yaman

Best Answer chosen by Yaman Neameh
ankit bansalankit bansal
Hi Yaman,
please use - Select id, (SELECT Id FROM ContentDocumentLinks) From Case limit 5
standard child relationships need to have 's' at the end, for e.g. select id,(select id from contacts) from account.

All Answers

ankit bansalankit bansal
Hi Yaman,
please use - Select id, (SELECT Id FROM ContentDocumentLinks) From Case limit 5
standard child relationships need to have 's' at the end, for e.g. select id,(select id from contacts) from account.
This was selected as the best answer
Yaman NeamehYaman Neameh
Hi Ankit
Thank you very much for your support,
I tested it successfully after adding 's' to ContentDocumentLink.
Best Regards
Yaman Neameh