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
Brandon WermesBrandon Wermes 

SOQL Query in FeedItem for ParentID Object Type

Good evening,

Could any of you fine folks provide some assistance? I have a trigger where I need to find the Object that the ParentId of a Chatter post belongs to. This is intended to be used on the Case Feed to identify FeedItem posts made by a specific user. I've got all of the components of the trigger down except being able to validate that the ParentId of the FeedItem is in the Case object.

My code is below:
 
List<feeditem> FIList = [Select Id,ParentId
                                                 	FROM feeditem fi
                                              		WHERE fi.CreatedById =: '005G0000003qm9v' and ??????????????]

any suggestions please?
Nayana KNayana K
List<feeditem> FIList = [Select Id,ParentId
                                                     FROM feeditem fi
                                                      WHERE fi.CreatedById =: '005G0000003qm9v' and Parent.Type='Case'];