-
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
What is Enhanced Domain Deployment in Salesforce in 2023?
The next edition of My Domain is enhanced domains. With enhanced domains, all URLs in your organization, including those for your Experience Cloud sites, Salesforce…
Salesforce Sharing and Security Features
Introduction: Salesforce provides different kinds of security levels like objects, field records, etc. Data is Stored in Objects, Fields, and Records in Salesforce. Salesforce uses…
Inline Edit Support in Custom Component in Salesforce Lightning
If you have a situation where you need to create a custom component with inline edit functionality then this article will help you. However inline…
Popular Salesforce Videos
What is a Salesforce Admin?
Salesforce administrators are the gatekeepers of their employer's sales and marketing data. They create each user account and determine the proper level of access based…
Salesforce Development and Career Opportunities
Salesforce is the world’s #1 customer relationship management (CRM) platform. Salesforce allows sales reps to see everything about a customer in one place and provide…
Understanding Approval Process in Salesforce | How to create an approval process?
In this video, Shrey discussed Approval Process in Salesforce in detail and also he covers the following topics: 1. What is Approval Process? 2. How…