I am trying to fetch case feed from case in soql, I have tried with below but it throws out the error: Didn't understand relationship 'casefeeds' in FROM part of query call.`

Select Id, CaseNumber, CreatedDate,(select id,parentid from casefeeds) From Case Where Status ='Pending Customer'

I can see that case feed with this query but i need to fetch from case object

Select id,parentid from casefeed

1 Answer 1


The relationship name is FEEDS so the following query should work.

SELECT Id, CaseNumber, CreatedDate,(SELECT Id,ParentId FROM Feeds) FROM Case

If you want to view the relationships, you can use this code.

List<Schema.ChildRelationship> relations = Schema.getGlobalDescribe().get('Case').getDescribe().getChildRelationships();


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .