Newer Version Available

This content describes an older version of this product. View Latest

getCaseIdFromEmailThreadId(emailThreadId)

Returns the case ID corresponding to the specified email thread ID. (Deprecated. Use getCaseIdFromEmailHeaders and EmailMessages.getRecordIdFromEmail instead.)

Signature

public static ID getCaseIdFromEmailThreadId(String emailThreadId)

Parameters

emailThreadId
Type: String

Return Value

Type: ID

Usage

The argument for emailThreadId, also known as Ref ID, has the format !00Dxx01gEW.!500xx0Yktl. This format was introduced in the Winter ‘24 release. The previous format, _00Dxx1gEW._500xxYktl, is supported for backward compatibility, but emails sent from the Winter ‘24 release onward use the new format. Other formats that include ref: or [ref: aren’t supported by this method.