-
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 Acquisitions 2019: How Salesforce Made Its Mark This Year
Salesforce, the world’s #1 CRM, has made many acquisitions in recent years. A few of them have even reached up to billions of dollars. The…
How Sales Cloud Helps Sales Managers Track Team Performance Accurately
Sales managers face a critical challenge: tracking team performance across multiple deals, activities, and metrics. According to recent industry research, 79% of sales organizations struggle…
What Are Salesforce Quickstart Packages
You might see the word QuickStart thrown around a lot yet might be wondering what the heck a QuickStart is. In this article, we’ll discuss…
Popular Salesforce Videos
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.…
SQL Row_Number - Salesforce Marketing Cloud Functions in 5 minutes
Cameron Robert shows how to use the Row Number (Over Partition By) SQL function in Salesforce Marketing Cloud. The SQL Row Number function can be…
Why Users Cannot be Deleted from Salesforce | How to Delete User from Salesforce?
Why users cannot be deleted from Salesforce and how to delete users from Salesforce? Watch this video and learn all about it. Do let us…