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
Michael Fahey 31Michael Fahey 31 

Messaging.inboundEmailHandle and Case emails

When the email is returned the custom field on the emailMessage record has be overwritten (null) and previous value is gone. 
I am not running an Process Builders or Flows.  Is there a reason for this?

Can Messaging.inboundEmailHandler be used for Case email (Email Case Feed)? that are incoming (back) to SF?

I have enabled Email Services and created a custom class that implements Messaging.inboundEmailHandler.
On the EmailMessage object I have created an custom field.
When I include the custom field on the class I get the message "Variable does not exist". 

 
Vishwajeet kumarVishwajeet kumar
Hello,
Yes, custom email handler can be used in Email service email address. if custom handler is used on incoming email messages it is possible that value is getting overwritten their. Debug logs can be used in email handler to find the location of data change.

Thanks