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 increase Opportunity performance?

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 suggestions.

Thanks in advance,
Lakshmi.
ShivankurShivankur (Salesforce Developers) 
Hi Lakshmi,

Its always recommeded to restricting your org to one record-change process builder per object. Here’s why.
  • Get a consolidated view of your org’s automation for an object
With one consolidated record-change process for an object, you can see all the criteria that are evaluated each time that object’s records are updated, as well as the actions that are performed when the criteria are met.
  • Avoid hitting limits
When you consolidate your processes for one object into one master process, you also consolidate the actions in those processes. With fewer actions, your org is less likely to hit limits, such as number of SOQL queries.
  • Determine the order of operations
If you create multiple record-change processes for an object, Salesforce can’t guarantee the order in which those processes are evaluated. When you automate everything in a single process, you explicitly set the order. The first criteria node is evaluated first, the second criteria node is evaluated second, and so on.

You can find more helpful information in Salesforce documentation for best practices with Process builder.

Reference:
https://help.salesforce.com/articleView?id=sf.process_considerations_design_bestpractices.htm&type=5

If you wish to go with batch operation then refer to below link for implementation guidance:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm

Hope above information helps, Please mark as Best Answer so that it can help others in the future.

Thanks.