-
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
Going Beyond Traditional Implementation Methodologies for Salesforce Service Cloud: A Fireside Chat
Salesforce Service Cloud has myriads of capabilities that enable you to ace your customer service game. But optimizing Service Cloud the right way calls for…
Dreamforce 2022 Highlights - Everything You Need To Know
The Salesforce’s annual event, “Dreamforce” was held in San Francisco from September 21 to 23, completing their 20 years of magnificence. This year’s event was…
Popular Salesforce Videos
Creating leads using Amazon Alexa with salesforce.
Amazon EchoAmazon Echo is a voice command device with functions like question answering, playing music and controlling smart devices. Echo connects to Alexa which is…
What is Headless Commerce in Salesforce Commerce Cloud?
With the advent of COVID, the buying journey of customers has changed significantly. As a result, brands need to keep up with this change and…
Spring'21 Prior Value in Salesforce Record Triggered Flows - ISCHANGED IN Salesforce Flows
In this video, I'm talking about the Prior value feature in the Spring'21 pre-release that is for the record triggered flow. Pre-Release Org URL: https://www.salesforce.com/form/signup/prerelease-spring21/…