-
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
Top 8 Things to Consider While Selecting Salesforce CPQ Consulting Partner
Salesforce CRM has been a revelation when it comes to elevating the productivity of the company. Starting from managing the Sales Funnel to getting the…
How to insert a record in Salesforce by using AMPscript?
How to insert a record in Salesforce by using AMPscript 1- First you have to create a cloud page in the Marketing Cloud 2- Use…
What is Custom Metadata in Salesforce in 2023?
Metadata is data that describes other data. for instance, in Salesforce org, there's a standard object called Account. Once you add a record with a…
Popular Salesforce Videos
Salesforce Marketing Cloud Connector for UiPath
This is a connector for Salesforce Marketing Cloud that allows you to work in the background with SFMC instance. watch this video and let us…
15 Things You Didn’t Know About Salesforce
In this video we'll try to answer the following questions: What is Salesforce and why it is used? What is the job of Salesforce developer?…
Salesforce Integration Using Oracle SOA Suite
In this video, Bristlecone gives an introduction to Oracle Cloud Adapter for Salesforce.com. Afterwards, he goes into detail about how to integrate Salesforce.com using Oracle…