20 votes
Accepted

Check if an input is numeric or not

Yes. The Salesforce dev guide has a bunch of String methods for this kind of stuff. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_string.htm Methods ...
user avatar
  • 5,459
11 votes

How do I test email to case in the Sandbox

What Brian is trying to tell you is that there are different email addresses for Production and for Sandbox Email to Case. Cases are being created in Production because you are using a production ...
user avatar
  • 2,063
9 votes
Accepted

Differences between email to case and on demand email to case

The email to case is a java process that reads all of the data in the email and then assigns pieces to various fields in SF and then does an Insert or Upsert into the SF system. Because the email is ...
user avatar
  • 410
9 votes

How do I test email to case in the Sandbox

You will need to update the email forward for Email-to-Case to the new email when you setup the email address in Sandbox. The addresses are different in the two environments. The test email is sent ...
user avatar
7 votes

how to deploy Email-to-case settings in other sandbox?

Email-to-Case Settings can be deployed using the Settings Metadata API Object specifically CaseSettings. However, there are issues: (As of V49) No MDAPI support for the default recordtype - you would ...
user avatar
  • 61.4k
7 votes
Accepted

How to obtain trigger log from Email2Case?

The running user for Email to Case is found in Setup | Customize | Cases | Support Settings under the field Automated Case User if you are using On-Demand E2C The user listed in the Case History ...
user avatar
  • 61.4k
6 votes
Accepted

Difference between Email Address and Email Services Address - Email2Case

Sethu From the doc on the page: Define email addresses on your email system for case submissions. Create email routing addresses that include the addresses defined for cases. Configure your ...
user avatar
  • 61.4k
6 votes
Accepted

How to store (or ignore) Base64 images in emails processed by email-to-case?

Following trigger parses case description for base64 images and creates attachments for case. Email-to-Case functionality stores email body in case description. Let's assume we have next html: <...
user avatar
  • 4,057
6 votes
Accepted

Code optimisation on EmailMessage

Don't Skimp on Curly Brackets You may think that you're saving some space/typing with: if (em.Incoming) caseIds.add(em.parentId); But you're actually risking a very subtle bug. Commenting a ...
user avatar
  • 429k
5 votes

Check if an input is numeric or not

The String class had isNumeric(), isAlpha() and a number of other methods for checking the contents of Strings added in Winter '13. The documentation for these methods can be found here : isNumeric ...
user avatar
  • 13.2k
5 votes

Differences between email to case and on demand email to case

On-demand email to case is a good option if you know Email attachments (if any) won't be greater than 25MB in size You are not concerned about keeping the emails traffic within your firewall You won'...
user avatar
  • 5,517
5 votes
Accepted

Getting the case email reference code

This information is not stored in a field but it can easily be calculated in a formula or in Apex. Formula: "ref:_00D" & MID(Id,4,1) & "0" & RIGHT($Organization.Id, 4) & "._" & ...
user avatar
  • 7,837
5 votes
Accepted

Email-To-Case, Set Field Values When Email Arrives

Rather than creating "dummy" record types, which seems like a heavy handed way to identify the different incoming Email2case types, why don't you add different case origins to the picklist, and set ...
user avatar
5 votes
Accepted

Close Case If No Reply Within 48 Hours?

You can do this using nothing but configuration via the Process Builder. Step 1: Create Timer Field On the Case object, create a date time field with no default value. Step 2: Create Process 1 In ...
user avatar
  • 429k
5 votes
Accepted

Email to case issue: Finding actual email id for which case is getting created

Let's say, Email-to-Case set up is like this: And user is sending single email to both the address bc@outlook.com and abc1@outlook.com. So, there are 2 cases will be created and you if see any one ...
user avatar
5 votes
Accepted

custom Email Service - inline images appear as '[Image is no longer available]' upon Reply/ReplyAll

This is how I solved the problem, after saving off the attachments then I updated the message body to replace the cid references with URL to the files. For some magical reason, Salesforce will ...
user avatar
  • 3,976
5 votes
Accepted

Changing Email service address after turning on My Domain

No, the email service addresses for email-to-case will not change. The org I work in now has My Domain, and a bunch of old email-to-case addresses that still work. (In fact, in checking, I realized ...
user avatar
5 votes

how to deploy Email-to-case settings in other sandbox?

No, it looks like we can't deploy them via changesets and any other tool. The best you can do is deploy via Force.com migration tool is EmailServicesFunction which contains EmailToCase and ...
user avatar
5 votes
Accepted

Is there a way to detect, via SOQL query or describe, whether Email-to-Case is turned on in an org?

You could look at EmailServicesAddress and EmailServicesFunction. SELECT Id, FunctionName, isActive FROM EmailServicesFunction The above will return a row with the following info when E2C is ...
user avatar
4 votes
Accepted

Test class for mimicing email to case functionality

You should be able to create an instance of your class that implements Messaging.InboundEmailHandler in the test method and then pass it a Messaging.InboundEmail and Messaging.InboundEnvelope. This ...
user avatar
4 votes

Salesforce Web to Case spams

When first starting to deal with incoming spam via web to lead or case, I always start with these suggestions - https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-resolve-Web-to-X-Spam-...
user avatar
  • 481
4 votes
Accepted

How can I configure salesforce to notify a customer case contact when an internal support rep sends in a email updating the ticket?

Here is a detailed tutorial that explains how to create a custom publisher action for Case Comments. Once you complete all the steps, the Case Comment shows up as a publisher action as shown below.
user avatar
4 votes
Accepted

Email-to-Case: where can I find the ThreadID?

Thread Ids are generated only for outbound emails from within the case. Since you have enabled thread ids, you should start seeing them on the Email related list once you send out emails regarding ...
user avatar
  • 3,782
4 votes

Case.Thread_Id, is Thread_Id a field on Case object?

Only reliable way to get the Thread Id at this time is when getting the result from Salesforce itself. You can do this by getting the result that Salesforce would generate when sending an Email: // ...
user avatar
4 votes

Email2Case: How to stop OOO replies updating cases

To fix this issue at the root would be to have your mail server configured in such a way that emails which contain key words, such as 'Out of office', are ignored. Although that would typically be an ...
user avatar
4 votes
Accepted

Workflow Email Alerts Not Log In Email Related list of Case

This is currently missing functionality from salesforce. there is currently an idea on the success.salesforce.com site for this - Salesforce Success The work around that we use here is to make sure ...
user avatar
4 votes
Accepted

Disable assignment rule(s) and default owner when using email-to-case?

I've solved this as follows Recognize that triggers run before assignment rules and E2C will run assignment rules. In before insert trigger, set custom field Bypass_Assignment_Rules__c to true for ...
user avatar
  • 61.4k
4 votes
Accepted

Email2Case - Create new case on replies after X amount of days

I can tell you how we do this. We have a custom emailHandler that processes emails as they come in. Our email handler checks to see if the email relates to a closed case and re-opens it. It would be ...
user avatar
  • 9,063
4 votes

Email to Case (on demand) forwarding via Outlook rules

I think your issue might be with how you're handling the inbound email from Outlook/Exchange. If you're "Forwarding" the email to the unique SFDC email address, then it is in fact coming from your ...
user avatar
4 votes

Not able to query attachment coming from email to case

If you are on Lightning Experience, the attachments are being saved on a different object/table called ContentDocument. The binary data itself is stored in a related object called ContentVersion, and ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible