-
Error while inserting the feedItem in Salesforce
I want to insert the feedItem.
List<FeedItem> fd= [select body from feedItem where parentId='5007F0000018WrE'];
List<FeedItem> it = new List<FeedItem>();
for(feedItem sa:fd){
FeedItem f1=new feedItem(body=sa.body, parentid='5007F000002ATW0');
it.add(f1);}
insert it;it is showing the following exception-
System.DmlException: Insert failed. First exception on row 1; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Body]: [Body]
Log In to reply.
Popular Salesforce Blogs
Salesforce Apex Coding Best Practices | Developer Guide
1. Thou Shalt Keep thy code dumb straightforward (KISS guideline) In programming advancement, applying the KISS guideline implies your code is kept perfect and succinct. …
Test Classes in Salesforce - Learn All About it Here
Content What is a Test class in Salesforce? What is the need of a Test class in Salesforce? How to write Test class in Salesforce? …
Top 7 New Salesforce Flow Features in Winter 23
I usually go right to the Salesforce Flow area when the Salesforce release notes are out because, well, there is already a lot of amazing…
Popular Salesforce Videos
Salesforce Announces New Salesforce CDP Updates | Salesforce CDP
Salesforce, one of the largest global providers of CRM solutions, launched Salesforce CDP last year. Salesforce Customer Data Platform is an enterprise customer data platform…
Share Visualforce Pages Between Classic and Lightning Experience | Salesforce Trailhead
Visualforce Pages should be created correctly such that they behave properly whether they run in Salesforce Classic or Lightning Experience. Detecting and Responding to the…
Introducing the New gRPC-based Pub Sub API | Salesforce Developer Quick Takes
Learn about the Pub Sub API, a new gRPC-based API that exposes the power of the Salesforce Event Bus. Discover the technology, its use cases,…