-
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
Salesforce for the Manufacturing Industry
In an era marked by rapid technological advancements and changing customer expectations, the manufacturing industry has transformed. Salesforce is one of the key enablers of…
How to Integrate Jitterbit With Salesforce?
Whenever we contemplate about database and Salesforce the name that immediately captures our mind is Jitterbit. Jitterbit is one of the most powerful and appropriate…
Top Advantages of Integrating WordPress with Salesforce
We are already aware of the fact that WordPress is the world’s most commonly used Content Management System (CSM) which people rely on heavily across…
Popular Salesforce Videos
Salesforce Maps Tutorial
Salesforce Maps is the functionality from Salesforce that allows your Sales team to more effectively manage their accounts within their territories. Watch this video to…
Demo - Increase Your Sales Effectiveness With Sales Enablement and eSigning Inside Salesforce
In this video you will learn how to increase your sales effectiveness by creating, sending, tracking and engaging your potential customer, right inside Salesforce, through…
Salesforce Apex Rest API Integration | Salesforce Integration
As you know Salesforce is an online cloud solution, we might be required to integrate Salesforce with some other third party tool. We have released…