Creating Chatter Records

Creating a Chatter record requires using the GenericEntity class.


GenericSalesforceEntity feedItem = new GenericSalesforceEntity("FeedItem");

//The ParentId is the ID of the sObject that the Feed Item is attached to. In this case it is a Contact ID.
contactFeed.InternalFields.SetField("ParentId", "0039000000Msoqj");
contactFeed.InternalFields.SetField("Body", "Some chatter text");
GenericSalesforceService chatterContactService = new GenericSalesforceService(GetSalesforceSession, "FeedItem");
SaveResult saveResult = chatterContactService.Insert(feedItem);