1

We have a custom object Client_Intake_Upload__c with custom field Hub_Spoke_Account__c that is connected to ContentDocumentLink object. The polymorphic relationship field on ContentDocumentLink is called LinkedEntity. When we run the query below, ContentDocumentId and LinkedEntityId get returned but not Hub_Spoke_Account__c (which is not null).

SELECT ContentDocumentId, LinkedEntityId , TYPEOF LinkedEntity WHEN Client_Intake_Upload__c 
 THEN Hub_Spoke_Account__c  END FROM ContentDocumentLink 
WHERE LinkedEntityId IN (SELECT Id FROM Client_Intake_Upload__c Where Status__c = 'Uploaded')

How can we get Hub_Spoke_Account__c to show?

3
  • 2
    although i don't have your object model, when i ran the equivalent in my org; works fine. Are you sure this isn't an artifact of debug log which won't show parent fields returned in a SOQL query?
    – cropredy
    Commented Feb 4, 2022 at 0:01
  • How are you trying to read/render the value?
    – Adrian Larson
    Commented Feb 4, 2022 at 0:04
  • Adrian, Cropredy: I am just running that SOQL query on Developer Console -> Query Editor
    – Burak
    Commented Feb 7, 2022 at 20:59

0

You must log in to answer this question.

Browse other questions tagged .