You need to sign in to do that
Don't have an account?
salesforce1587
Implementation restriction: FeedItem requires a filter by Id
Hi,
I'm getting the following error: Implementation restriction: FeedItem requires a filter by Id.
For custom standard user profiles.
For system admin i'm not getting this error.
Following is the code that i"ve implemented:
public List<FeedItem> getChatterCount() {
return [select id from FeedItem where parentID =: ApexPages.currentPage().getParameters().get('id')];
}
Pls. suggest
Thanks,
Neha G Patel
From the error message, my guess is that you don't have an id value in your parameters.
I am getting the same error for slandered user. Did you get this resolved?
I'm having the same issue. It involves working with the Email Attachments app from CRM guidance. I'd love to find out how to fix it.
Any progress yet?
It is too old post to reply. But in case somebody else is looking at it..
Cause of this error :- is that you have declared the class where this query exist as "with sharing" and all the feed item queries in a class "with sharing" requires an feed item id in the filter.
Fix: Move the query part to a separate utility like FeedItemQueryUtils and make a static method to do the query. Mark the FeedItemQueryUtils class as without sharing (not mention anything about sharing - default is without sharing)
I also got stucked in FeedItem query
"Select Parent.Id, ParentId, LinkUrl, Id,ContentFileName, RelatedRecordId From FeedItem where ParentId=:objectId and type='ContentPost' Limit:recordLimit"
and it was showing error(Implementation restriction: FeedItem requires a filter by Id) for "Chatter Only user " profiles.
So after some RND we can modify our query by querying it from "CollaborationGroupFeed" and query looks like
"[Select Parent.Id, ParentId, LinkUrl, Id,ContentFileName, RelatedRecordId From CollaborationGroupFeed where ParentId=:objectId and type='ContentPost' Limit:recordLimit];"
and now it's working fine for all profiles.