-
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
How Salesforce Einstein Can Help You Improve Your Lead Scoring?
In a previous article, we discussed Predictive Lead Scoring and its importance for contemporary marketing. In addition, we saw how the Salesforce CRM, with its cutting-edge…
Salesforce Spring'21 Release Update For Nonprofit Cloud
Organizations have adopted technology as a crucial strategy in handling the new normal as the environment continues to shift. Moving to digital and spending more…
Resolve Customer Service Teams Issues More Efficiently With Slack | Salesforce Guide
It is easy to see why so many contact centre managers are becoming more frustrated. Not only are they forced to reduce costs, but they're…
Popular Salesforce Videos
AMPscript FOR LOOP - Salesforce Marketing Cloud Functions in 5 minutes
Salesforce Marketing Cloud functions in 5 minutes! In this video Cameron Robert shows how FOR LOOPs work in Salesforce Marketing Cloud using some helpful visuals…
Tips for Importing Data in Salesforce
Data can be easily imported into Salesforce through various tools provided by Salesforce. Supported data sources include any program that can save data in the…
Cross Component Communication with Custom Events | Salesforce Developer Quick Takes
In this Quick Take, we will learn how to take Custom Events and apply them to a common use case. We’re first going to take…