Activity › Forums › Salesforce® Discussions › Can I change which records chatter files are shared to through Apex? Tagged: AccountId, Attachment, Chatter, ContentPost, FeedItem, ParentId, RelatedRecordId, Salesforce Apex Salesforce® Discussions Can I change which records chatter files are shared to through Apex? Posted by Ravi on April 30, 2016 at 5:58 PM Can I change which records chatter files are shared to through apex? Surbhi replied 9 years, 11 months ago 2 Members · 1 Reply AccountIdAttachmentChatterContentPostFeedItemParentIdRelatedRecordIdSalesforce Apex 1 Reply Surbhi Member May 26, 2016 at 6:00 AM Hi Ravi, You have to work on the “FeedItem” Object. Here are the steps: Get the FeedItem, that has Type = ‘ContentPost’ and ParentId = AccountId. Create a new FeedItem object and copy the Body, RelatedRecordId, Title & Type fields from FeedItem record from Step 1. Set the new FeedItem from Step 2. ParentId as the AccountId you want to move attachment to. Insert FeedItem, (and delete prev. feed Item if you want to). Thanks Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me