Chatter post in lightning experience allows to post multiple files at a time as shown below enter image description here

Now, after the files, I want to query the records and update related parent object, which in my case is "Event" and update the number of total files attached and / or Notes attached. When I am querying 'FeedItem' it is only showing the one record instead of three using the below query

FROM FeedItem

Where does salesforce keep other child records of file related to a chatter post?


It's in the FeedAttachment object. See the example towards the bottom of the documentation page:

SELECT Body, (SELECT RecordId, Title, Type, Value FROM FeedAttachments) 
FROM FeedItem 
WHERE Id = 'some_feedItem_id'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.