You need to sign in to do that
Don't have an account?
enrydev
Return with Soql query “Related Content”
I'm trying to write a soql query to get all the content's ids of the related content on a custom object.
I would like to know which are the related content of a record.
I have tried with Schema Explorer but have access to related content informations looks impossible.
Is it possible?
Thanks in advantage for any advice.
BR
Can you be a little more clear in your explanation?
Did you want to get all the child ids of a partcular parent record?
Please explain us more
Thanks
On my custom object record i'm adding related content files, they are showed in a related list on the page layout.This is a standard Salesforce feature that let you add Content Files to your record.
I want create a visual force page with that related list.But In my controller i'm not able to write the soql query to get all the ids of the salesforce content files for a certain record.
Thanks for your time.
This will be your query
CustomObject__c obj = [SELECT ID,Name, (SELECT ID,Name from ContentFiles__r) FROM CustomObject__c WHERE id = :customObjectRecordId];
Use obj.ContentFiles__r in your visualforce page pageblocktable value.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
I've tried the following query in the developer cosole
i get this error:
Thanks again.
Make sure that the name of the object is ContentFile__c, then in the child relationship you can write ContentFiles__r.
Another thing ContentFile is the child object of Software_Downloads__c, right?
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Content file isn't a custom object(ContentFile__c). I guess there is a standard object to store Content files related to a custom object.
But this is a standard salesforce functionality; let you add files (stored in Content) to a record .
Thanks a lot!
Please find the name of the object and write its plural form there.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
This is the problem , i' don't find where are stored the related content.
This is a related question:
Question