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
Intigration vIntigration v 

SOQL Query to filter with Contentdocument title on ContentdocumentLink object

Hi,
I have a requirement to get the files attached with specific title,am trying to filter the records with below query but it is giving me zero results.
There is already two files attached to my Lead record with the title "Customer reviwed".But it is giving me zero results when am applying filter with title.
Please can anyone helpme how can i query the title from contentdocumentLink object.

SELECT ContentDocumentId,contentdocument.title FROM ContentDocumentLink WHERE LinkedEntityId =:LeadId AND contentdocument.title='%Customer%'
Thank you!
The TechieThe Techie
SELECT ContentDocumentId, LinkedEntityId,ContentDocument.Title, ShareType, ContentDocument.OwnerId  FROM ContentDocumentLink where LinkedEntityId
The TechieThe Techie
SELECT ContentDocumentId, LinkedEntityId,ContentDocument.Title, ShareType, ContentDocument.OwnerId  FROM ContentDocumentLink 
Intigration vIntigration v
Hi Techie,
I dont want all the documents attached to the Lead  record,i want only files with specific title.The above query you shared is giving all the files attached .
Thank you!
Intigration vIntigration v
Hi,
I found the mistake i did here,below query worked for me.
SELECT ContentDocumentId,contentdocument.title FROM ContentDocumentLink WHERE LinkedEntityId =:LeadId AND contentdocument.title Like '%Customer%'