Skip to main content

I enabled the test run of release update: "Disable Ref ID and Transition to New Email Threading Behavior". As part of assessing the impact of this release update, I looked through my org's custom code to see if there was any mention of "Cases.getCaseIdFromEmailThreadId".

 

I am confused by this statement:  "In your org’s custom code, replace Cases.getCaseIdFromEmailThreadId wherever it occurs with Cases.getCaseIdFromEmailHeaders, EmailMessages.getRecordIdFromEmail, or a combination of both."

 

From how I first took this is I thought that one would need to look for this string "Cases.getCaseIdFromEmailThreadId" in their custom code and if one finds it mentioned somewhere then needs to replace it with one of these strings "Cases.getCaseIdFromEmailHeaders", "EmailMessages.getRecordIdFromEmail", or a combination of both. However, I just spoke with a Salesforce developer support agent today who told me that the opposite of what I understood is true. He said you need to look for either one of these strings in your org's custom code; "Cases.getCaseIdFromEmailHeaders", "EmailMessages.getRecordIdFromEmail" and replace it with "Cases.getCaseIdFromEmailThreadId".

 

Can someone please tell me which understanding is correct so I can do a correct analysis of my org's custom code?

 

Thank you!

1 answer
  1. Jul 10, 2024, 2:16 AM

    Per this documentation, getCaseIdFromEmailThreadId is deprecated. So if this is being used in the code, it needs to be replaced with EmailMessages.getRecordIdFromEmail or Cases.getCaseIdFromEmailHeaders(For incoming emails). I would say search for this method name(getCaseIdFromEmailThreadId) in your codebase. 

0/9000