+ Start a Discussion
Ravi_SFDCRavi_SFDC 

Regarding SOQL for the Custom Object

I do have a Custom Object with data when I open one record of the Custom Object referring to the below screenshot. How can write a SOQL so that I get the names of the HTML and Image file from the files which are part of the configuration data. Your help is really appreciated.

User-added image

AbhinavAbhinav (Salesforce Developers) 
Hi Ravi ,

Try this:
 
Select Id,ContentDocumentId,ContentDocument.Title,LinkedEntity.Name,LinkedEntityId FROM ContentDocumentLink WHERE LinkedEntityId = 'RecordId'

Details:

https://help.salesforce.com/s/articleView?id=000313683&type=1

If it helps mark it as best answer.

Thanks!
 
Ravi_SFDCRavi_SFDC
Hi Abhinav,

Thank you, this Query I am good. But the need is, I want this in my related custom object as join so that I can export and import JSON to the needed ORG.

Thanks.