Sometime I get emails from a customers in reply to a resolved case. They actually report a new problem but since they use reply, the email is being associated to the old case. Is there a way to create a new case from an existing email or at least to re-parent the email to a new case I will manually create?


To allow this to happen, EmailMessage.ParentId would need to be modifiable.

Since the DML framework does not allow this, you will not be able to write Apex code to make this happen.

  • note this answer addresses only one option - reparenting an email - to solve OP question; my answer suggested another solution – cropredy Mar 27 '15 at 18:29

Assuming that the email was added to the closed case because it came in on Email-to-Case with a thread ID somewhere in the subject or body resembling: ref:_ ... :ref, then you could do the following:

  1. Open the email and copy the contents into a text editor
  2. Change all ref:_ to foo:_ (or remove all the threadids entirely)
  3. Create a new email using the edited text and send to your Email-To-Case email address (the one used by your customers) - e.g. support@mycompany.com

SFDC will create a new Case; you can then go to that Case and change the Contact ID and Account reference to the true customer (not the sender at step 3)


Dedo, maybe I'm misunderstanding something, but if you want to manually reparent the email (i.e., Task record), would that be to...

  1. Open the task in Salesforce
  2. Click Edit
  3. Change the Related To field?

enter image description here

  • I'm talking about incoming email to case emails. They don't have these fields – Dedo May 9 '14 at 7:16
  • Dedo, you said "to re-parent the email to a new case I will manually create", which implies that you are going into Salesforce after the email is automatically processed and fixing the association. If you're trying to handle the incorrect association in code when the incoming email is processed, the first question is: How are you determining that the email is actually reporting a new problem (i.e., case), instead of following up on the existing case? Are you doing that simply based on the fact that the case was already closed? – Marty C. May 9 '14 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.