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
Sheila McEvoy 3Sheila McEvoy 3 

Anyone else have confusion about the Critical Update to Autolaunched Flow Interviews Activating on February 21, 2019

Logged a ticket with SFDC and they indicate that after the update, if your Process Builder triggers a Flow, that it will error out after updating 12 records.  Is that true?  This sounds like Salesforce doesn't want us to use Flows.

Here is the response from Salesforce: 
Salesforce Support February 1 at 2:01 PM EST
This is to keep it simple:

Consider an auto launched Flow (say Flow1) that takes an AccountId as input variable - Has only one RecordUpdate element in it that updates the Account.Description matching the AccountId with string "Case Created".
Consider a Process (say Process1) on Case object that gets triggered on Case create/edit - with "No criteria—just execute the actions!" and has an immediate action that calls this auto launched flow Flow1 with argument Case.AccountId

Now create 20 cases in bulk - with same accountId as follows
-----------------------------
List<Case> caseList = new List<Case>();

for(Integer i=0;i<20;i++){

Case c = new Case();

c.Status = 'New';

c.AccountId = '0014100000pINGZ';

caseList.add(c);

}

insert caseList;
-----------------------------

When 20 Cases are created, it creates 20 interviews of the Process1. Now each Process creates an interview of Flow1 - So 20 interviews of Flow1 are created and submitted for execution in one transaction and it fails on the 13th one.

Now, this should answer your questions:

1.Can you define what is "duplicated update"? Are we talking about duplicated parent or child Id or something else?
>In above scenario, every case record would update same Account (flow being on Account), so it fails after the 12th case record.

2.What about inner loop? Let's say I have 2 contacts and each has 10 tasks. When I loop through those contacts and update those tasks OUTSIDE the loops after storing them as a collection variables, would I still hit the limit?
>To be precise, in one transaction if the count at one bulk DML action is greater than 12 records it errors out.

3.Hitting the limit means when I have the DML inside the loop or outside the loop or both? If both, does it mean that even though I add all the tasks to be updated in the collection sobject variable and update them at one shot, as long as there are more than 12 tasks needs to be updated, I will hit the limit?
>Irrespective of the DML inside the loop or outside the loop or both or bulk DML from API/ REST or any bulk DML and you add all the tasks to be updated in the collection sobject variable and update them at one shot it fails with count >12.


4.How to determine what is the parents and what is the child in the flow? If I query multiple unrelated objects in the same flow and update them separately within the same flow, would I ever hit the limit?
>This is tricky to answer as it depends if they're all being updated in the same transaction at once.


5.At last, you still haven't tell us how to refactor our flow to avoid hitting the limit if we really have more than 12 tasks in a contact.
>Unfortunately, we do not have any workaround.

 
Amar SinghAmar Singh
As per Spring'18 Release Notes:
https://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/rn_forcecom_flow_invocable_cruc.htm

Maximum number of duplicated updates in one batch. If more than 12 duplicate updates are tried, the entire transaction is rolled back. if a flow is called from a process, make sure that it doesn’t update the same record as other interviews in the batch.

Updating unique records will not cause any issues. I believe updating collection of sObject <e.x Tasks> shouldn not cause this issue, as all the task records are unique.