---
schema_version: "1"
id: 49c6935319eda32b24f37284baffd8eb845af011051b312444394002848cfd80
title: Cases Methods
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_System_Cases_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_System_Cases_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4a0196356426471ed216ce7ca1fef6cc08e56edf3347e6507107bd5070f9f18d
---
# Cases Methods

The following are static methods for Cases.

- **[generateThreadingMessageId(caseId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_System_Cases_generateThreadingMessageId.htm)**  
    Returns an RFC 2822-compliant message identifier that contains information used to match the email and its replies to a case.
- **[getCaseIdFromEmailHeaders(headers)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_System_Cases_getCaseIdFromEmailHeaders.htm)**  
    Returns the case ID corresponding to the specified email header information, or returns null if none is found.
- **[getCaseIdFromEmailThreadId(emailThreadId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_System_Cases_getCaseIdFromEmailThreadId.htm)**  
    Returns the case ID corresponding to the specified email thread ID. **(Deprecated. Use getCaseIdFromEmailHeaders and EmailMessages.getRecordIdFromEmail instead.)**