-
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 to Install Service Setup in the Salesforce Service Cloud
When I started to implement Salesforce einstein Bots for the first time, I found difficult to understand the flow behind it and various channels involved.…
7 Most Common Questions About Salesforce Certifications
Salesforce certifications mark the first major milestone in a Salesforce professional’s career. They are great for power users that are looking to dive into Salesforce’s…
Resolution of Managed Packages - Salesforce DX Developer Guide
Working with Salesforce DX for the resolution of managed packages: First, we create an org and enable the DX version in it that is DEVHUB.…
Popular Salesforce Videos
Searching for Records In Salesforce
You can search globally across all of Salesforce for matching records to your search term. Or you can search within a specific object. You will…
What is Salesforce Integration? | Saleforce Integration Explained
Learn how to seamlessly connect different tools and data sources with your Salesforce platform. It's all about making informed decisions and gaining a competitive edge!…
Google Home Assistant Integration with Salesforce
Check out the below link for pdf view. https://www.linkedin.com/pulse/google-home-assistant-integration-salesforce-rajkiran-dewara/