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
cs uat 7cs uat 7 

Can I have multiple record update elements for the same record in a flow? Would there be any adverse effect from performance/DML actions?

I want to update a record on ABC__c object.

There are two fields "A"  and "B" on this record.

I have a few decision elements one to update "A" and one to update "B" and two record update elements. 

Based on first Decision Element, A value is updated vis a record update element. Then it flows to the next decision elements, to set the value for B, a record update element updates the record.

My question is to understand if having multiple record update elements for the same record causes any performance or DML issues?
k2018123k2018123
No, i dont think so it will have any issues.
The only thing you need to take care is of sequence of firing for the update. There should be no scenario that your update 2 fires first and update 1 is firing after sometime. Also, i think you can perform 150 DML operations in a single transaction. SO i think, you should be good.


Please mark it as best answer it it solves your issue :)

Thanks.
Gaurav HandooGaurav Handoo
Hi

I agree that it shouldn't have any issues as such. However, this is not a recommended approach, unless there are certain decision elements considering Field A for updating Field B; because it might lead to limit hit during bulk update operations.

In case there is no depedency on Field A for finalizing the value of Field B, recommended approach would be to use Sobject Variable and Sobject Collection. Your Sobject Collection variable would be used twice in two different assignment elements for each Field A and Field B, and post Field B update, push the details to Sobject Collection. Post this, you can use Fast Update element to push the details in one shot for update.

Hope this helps. Please mar as best answer if it does.

Cheers!!

Gaurav