-
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
The Need of Salesforce Support and How to Find the Right Partner
Salesforce is a top cloud computing company, offering powerful solutions in customer relationship management (CRM), enterprise social networking, and analytics. Salesforce makes it easier for…
Salesforce CRM for Fintech Industry
In the dynamic and highly regulated fintech industry, having a robust CRM system like Salesforce is crucial for managing complex client relationships and ensuring compliance.…
Protect your Data with Data Classification in Salesforce
Happy Cybersecurity Awareness Month (CSAM)! Did you know that the loss of critical, and often sensitive, information can severely impact the profitability and innovation of your…
Popular Salesforce Videos
Keep Salesforce Field Values Clean in Summer 20 in less than 10 minutes - Salesforce Break
Keep Salesforce Mobile Phone field clean by stripping out the ()- characters from the user entry. Ensuring data quality is a challenge for every Salesforce…
Introduction to Cloud Pages in Salesforce Marketing Cloud
Cameron Robert from Datarati introduces the Cloud Pages function in Salesforce Marketing Cloud and talks through the different Cloud Page types and how they can be…
What is Salesforce CPQ?
Unlock the power of Salesforce CPQ with our latest webinar. Whether you're a sales professional, business owner, or Salesforce enthusiast, this video breaks down the…