-
FeedItem through apexrest
When trying to create a FeedItem through the ApexRest I'm always getting the following error:
[{"errorCode":"APEX_ERROR","message":"System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Body]: [Body]\n\nClass.WS_SALES_V1_Document.post: line 61, column 1"}]
But according to the Salesforce docs, the Body field is Optional when Type is ContentPost.
Apex code of FeedItem creation(the insert fi; is line 61 by the way):FeedItem fi = new FeedItem();
fi.ParentId = o.Id;
fi.Type = 'ContentPost';
fi.Visibility = 'AllUsers';
insert fi;Is it a bug? Is documentation not up-to-date?
Log In to reply.
Popular Salesforce Blogs
Handle Your Cases Better With Algoworks Case Management App For Salesforce
Are you getting overworked with duplicate cases? Is your customer support team struggling with user dissatisfaction or high service cost? Are you finding it difficult…
How Virtual Salesforce Administrators Help with Automation
Robotic Process Automation (RPA) for Salesforce is a tool that allows you to automate certain tasks. This virtual Salesforce administrator can be helpful if you…
Detailed Guide to Implement Salesforce Multi-Factor Authentication (MFA)
Plan To Implement MFA Configuring Permission Set in Salesforce Login in to your Salesforce account On the setup page, search “Permission Set” Click the “New”…
Popular Salesforce Videos
Attribute Setup for Skill based Routing in Salesforce
This video is 3rd Part of the Omnichannel Series. Implementation of Attribute set up skill-based routing with the demo. Do let us know in the…
Are Privacy laws anti-marketing? - Salesforce, GDPR and CCPA
Are Privacy laws anti-marketing? Or a great marketing opportunity for organizations? Perhaps the underlying question is: Is your Marketing outreach an unwanted nuisance? Or worse,…
Salesforce Integration with Heroku
You can integrate Heroku and the Salesforce Platform in several ways, and choosing among them comes down to understanding your requirements and the capabilities of…