+ Start a Discussion
ShaTShaT 

Inserted By Id cannot be filtered in query call

Hi All ,

 

My senario is that I want to get AccountFeed for a particular user. but it is giving me error.

 

Inserted By Id cannot be filtered in query call 

 

Query -Select a.ParentId, a.Id, a.Body From AccountFeed a where ParentId=:account.id and InsertedById=:u.id ORDER BY CreatedDate DESC, Id DESC LIMIT 1

 

So how can i get AccountFeed for a particular User.

 

Thanks

Shailu

 

 

 

 

Cloud CredenceCloud Credence

Try this.

 

Create a formula field with the value of InsertedById and use this as a filter criteria.

 

Thanks

BharathimohanBharathimohan

Hi Shailu,

 

Try this,

 

 

WHERE ParentId=:account.id and InsertedById IN (SELECT Id FROM USER WHERE Id=:u.id)

 

 

Regards,

Bharathi
Salesforce For All

Mark this post as solved, if it helps you