function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venkata YammanuruVenkata Yammanuru 

How to retrieve only the latest conversation email body from a chain of emails in salesforce apex to update Case description

We are working on Email Services to create and update case records with emails.
when User sent an email, our email service class will create a new Case and populate few fields(description = emailbody).

When user reply with an additional comment , we need to fetch only the additional comment from email body.

But right now in the Replied email body also in apex class it is retrieving the older conversation as well along with latest one.

How to fetch only the latest email body to utilize for case Update.

Please help us out as this is a critical issue which needs to be resolved

Thanks in Advance