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
Lakshmi SLakshmi S 

How to improve Opportunity mass update batch size?

Hi Team,

We have around 20 process builders on Opportunity, can we convert these into trigger? Is this the best practice?
We need to increase the batch size for the Opportunity mass update.
Please share your thoughts.

Thanks in advance,
Lakshmi.
mukesh guptamukesh gupta
Hi Lakshmi,

Yes you should convert all PB in a single trigger, 
Yes you can increase batch size 1-2000, but in your code if you are uisng sub queries then you can face APEX CPU TIME LIMT EXCEED.

if you need any assistanse, Please let me know!!


Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 
Suraj Tripathi 47Suraj Tripathi 47
Hi Lakshmi,

Greetings!

1. Salesforce's best practice is to have only one trigger on one object.
So please convert your all process builder into one trigger if possible.

2. Please try to reduce the batch size as you can, try to make more chunks as possible.
Because if there is a batch taking more time to execute, then the governor limit will be void.

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi