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
Zanga TouréZanga Touré 

Can one get to the ContentVersion object by querying the FeedItem object?

This query returns Feed Attachments on a given opportunity record.

SELECT Title, ContentFileName, ContentType, RelatedRecordId, Type, Visibility FROM FeedItem where Type = 'ContentPost' And ParentID= '0067000000ajmPe'

I would like to select the latest version of the attachment in a where clause using the IsLatest flag a field on the ContentVersion object.  Is it do-able?
AshlekhAshlekh
Hi,

You can get latest by apply createddate in where clause as I think.