Case Auto Response Emails not triggered if case created in apex with triggerAutoResponseEmail = true with Process updating case in same transaction
Last updated Yesterday ·Reference W-4401877 ·Reported By 93 users
When a case is inserted using apex by setting the DML option triggerAutoResponseEmail = true, the Auto Response Email is not being triggered if there is an update on the case record by a Process Builder process in the same transaction
1. Create a Case Auto Response Rule with any criteria, for example:
Case Origin EQUALS Email
2. Go to Process Builder and create a process on Case object that updates case.description on any create/edit and activate the process.
3. Attempt to insert a case record in Apex using DML option triggerAutoResponseEmail set to true.
Case CaseRecord = new Case();
CaseRecord.Origin = 'Email';
CaseRecord.Status = 'new';
CaseRecord.Description = 'Test case';
CaseRecord.ContactId = '003N00000xxxxxx';
Database.DMLOptions dlo = new Database.DMLOptions();
dlo.EmailHeader.triggerAutoResponseEmail = true;
Email is not received at the email address in related contact's Email field.
Is to migrate any process builder updates to the triggering record out of process builder and into a before-save flow trigger: https://help.salesforce.com/articleView?id=sf.flow_concepts_trigger_record.htm&type=5
Reported By (93)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.