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
AshAsh 

Document on handleEmailMessage

Hi,

We are using the email to case feature for my company and I am customizing the application to suit our company need. I would like to know how thw handleEmailMessage method call works and what it exactly does. I could not find any documentstion related to in the sforce API documentation.

Can you please point me to the place where I can find the docs? or send me if you have a copy?.

Thanks in advance,

-AR
DevAngelDevAngel
The handleEmailMessage function is used to send the contents of the email to salesforce.com. When this function is used properly, it will cause a case to be created and any assignment rules or workflow rules will be applied.
AshAsh
Hi Dave,

Thanks for your relpy. I understand how email2case functionality is working but here is the problem I am facing during development.

If there is a contact record in SF for the email's from address, then the "Contact Name" filed is filed in. The API call(handleEmailMessage()) pulls the contact name based on the email address that it received the mail from and fills in the case record "Contact name".

If the email address does not exist in salesforc then the field is blank. I don't want the field to be blank, so I am creating a new contact record before calling the handleEmailMessage() method. But the API calls fails to fill in the "Contact Name" field in the case record eventhough the conact record exist in SF. However when a new the mail is send from the same address the field is filled in for the new case.

Not sure why this happening. I tried refreshing the login session before calling the handleEmailMessage() method but it does not help.

Any suggestion will be of great help.

Thanks a lot.