You need to sign in to do that
Don't have an account?
vagish
Need helo to retrieve related contents of Opportunity
Hi,
Is there any way to retrieve related contents of any opportunity via SOQL?
Scenario: I have attacted two contents to an Opportunity using related Content List on an Opportunity Object. I want to retrieve the ids of those two contents via SOQL for that Opportunity.
select Opportunity__c from Content__c where Opportunity__c = :THIS_OPPORTUNITY_ID
If you might have noticed, Opportunity and CRM Content both are standard objects.
Never used Content.
What is your question?
Just looked at the schema.
There is a reference in ContentVersion called FirstPublishLocationId to every available object including opportunity.
There is then a reference in ContentDocumentFeed called RelatedRecordId to ConentVersion.
Could you get to the Content this way?
Yes I tried in this way but FirstPublishLocationId is empty for each record in ContentVersion.