-
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
Why Real Estate Businesses Are Turning to Salesforce Customer Portal For Improving Client Relations?
Real estate is dynamic, and like any other industry, it involves specific challenges like working with customers, processing enormous amounts of property-related information, and timely…
Importance of Building the Right Salesforce Support Team
Customer Care has now become a big industry due to the mass evolution of technology. A consumer is no longer a passive entity; they possess…
Low-Code vs. Pro-Code: Choosing the Right Approach on Salesforce Platform
Low-code and pro-code development models represent two powerful ways to deliver solutions on the Salesforce platform. As organizations accelerate digital innovation, the question of which…
Popular Salesforce Videos
What is Lead Assignment rule in Salesforce and How to create it?
This video explains Lead Assignment rules in depth in an interesting way and fun way. This video is divided into 4 parts: - What is…
Salesforce Winter 18 Release for Busy Admins
Contents: Lightning Report Builder Dashboard Report Filter Lightning Hover Components Conditional Page Components Setup Search in Lightning Lead Conversion Updates User Interface Settings
Apex Variables & Datatypes | Apex Basics | Salesforce Development Tutorials
In this video variables, datatypes, literals and identifiers in Apex language have been explained in detail . This video contains only the primitive datatypes in…