-
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 Data Migration - Guide to the Best Practices
Movement is a one-time action; when the information is stacked into the Salesforce organization, the relocation task is finished. So it is critical to keep…
Salesforce Announced Life Science Cloud | Briefly Explained
Salesforce Life Science Cloud is a trusted secure platform for pharmaceutical (pharma) and medical technology (MedTech) organizations to help them accelerate drug and device development,…
How To Get Started With Workflow Automation? | Salesforce Guide
Automation is being embraced by businesses globally. In order to reduce employees' growing workloads and provide customers with the services they expect, it has become…
Popular Salesforce Videos
How To Drive More Sales With Marketing Automation in 2023 | Marketing Cloud | Webinar
Are you curious about how to drive more sales for your business? Every business wants to create a market space for its business or product.…
Improve Your Front and Backend Team Collaboration With Sinergify | Salesforce CRM
Businesses that use Salesforce CRM and Atlassian Jira separately face a lack of team collaboration, inconsistent customer data, slower case resolution, and reduced agent productivity.…
Drive Personalized and Scalable Idea Management in Salesforce Community Cloud with IdeasPro
IdeasPro enables you to implement the best of business ideas from your Salesforce community. Foster innovation, improve brand transparency, and make the most of internal…