Process Builder scheduled actions fail to resume on EmailMessage records that have no related ActivityId
Last updated 2018-02-10 ·Reference W-4367335 ·Reported By 0 users
When a process scheduled action is scheduled on an EmailMessage that has no related activityid (and no related ParentId if Email-to-Case is enabled), the action gets retried for ever and does not let other actions to continue. This effectively clogs the scheduled action queue, causing a backup of valid scheduled actions which can cause hourly scheduled action limits to be reached.
0. In an org with Enhanced Email and Communities enabled.
1. Go to Process Builder and create a Process
- Object "Email Message", "only when a record is created"
- Criteria is "No criteria—just execute the actions!".
- Schedule is "0 hours after created date"
- Action: Update records, set EmailMessage "Is Externally Visible" to FALSE
- Activate the Process.
2. Create a Case
3. Using Workbench, create an EmailMessage record as follows:
RelatedToId = 18 char CaseId of the case created above
Status = 1 (for example)
Subject = TEST (for example)
Using Workbench, look at the record you just created and see it has an ActivityId
Expected/Actual results: Process is triggered and a waiting interview appears in Setup | Flows | Paused and Waiting Interviews. Wait a couple minutes and the waiting interview processes as expected.
4. Using Workbench, create another EmailMessage record, same as in #3 BUT this time leave RelatedToId blank.
Note: Using Workbench, look at the record you just created and see it has no ActivityId
Actual Result: Process is triggered and waiting interview is created. However, that action will never successfully process. In the background it is retried and fails every few minutes, and will remain in queue until manually deleted.
Expected Result: The failing action should be removed and subsequent actions must continue.
Side note: If you re-try #3 at this point, that action will be scheduled, but will not process as long as the action from #4 is still in queue trying/failing. Deleting the failing action created in #4 allows this action to process.
Manually delete the offending scheduled action.
Reported By (0)
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.