function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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