Spring 25 sees a Release Update enforcement of the latest Email-to-Case threading mechanism Disable RefId and Switch to Lightning Threading
I have an org that is still using RefId threading
I want to ensure that once I switch to Lightning Threading, that incoming emails containing the old RefId thread token will still match to the Case in the event that Lightning Threading Token fallback strategy (header-based threading) fails.
Given that my code can inspect the incoming email and detect the RefId threadId (e.g.
ref:!00DXXXXXXX.!5000XXXXXXX:ref)- I can use the (deprecated) method to find the caseId
Id caseId = Cases.getCaseIdFromEmailThreadId(refId)
- I can use the (deprecated) method to find the caseId
However, when I use this, I get the error:
System.InvalidParameterValueException: You don't have access to the getCaseIdFromEmailThreadId apex method.
Use getCaseIdFromEmailHeaders instead.
I tried with Apex class versions 46 - 60; same error. How do I resolve?