function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karan KeharKaran Kehar 

When sending emails using SingleEmailMessage class , the threadidentifier field is empty in the email message record getting created

Hi All,

I am sending an email from Salesforce using SingleEmailMessage class but the email message record which is created has no value in the thread identifier field but it exists when sending email from standard send email button 
AnudeepAnudeep (Salesforce Developers) 
Karan - This is likely related to the winter'21 release update. I suggest creating a support case to confirm this behavior

Disabled Ref Id and New Threading Behavior for Email-To-Case

Starting with the Winter ‘21 release, all new orgs default to the new threading behavior and Email-to-Case no longer supports string-based threading. The Release Update, Disable Ref ID and Transition to New Email Threading Behavior, lets admins of existing orgs turn the new threading behavior on or off until the update is auto-enforced with the Summer ’21 release.

Existing orgs continue to to use RefID as the main criterion for matching emails until admins enable the new threading behavior. When the new threading behavior is enabled, Email-to-Case won’t insert Ref ID for outbound emails, and ignores the Ref ID from incoming emails for matching.
sabarinathan Ravindran 4sabarinathan Ravindran 4
@karan Kehar : I also send email via SingleEmailMessage , from case  with the new Threading behaviour iam not ablet see threadidentifier and Messageidentifier for emailmessage record. How do i generate for new emails ? did you find any answer ?