Articles on: Salesforce Integration

Error “FillRequiredFieldsBatch” when reinstalling Cooby package

When reinstalling the Cooby Salesforce package, you may encounter an error related to FillRequiredFieldsBatch. This batch job is responsible for updating required fields on Lead and Contact objects, allowing Cooby triggers to function correctly.


In some Salesforce environments, the job might fail because of custom automations such as flows, triggers, or process builders that also execute when a large number of Lead or Contact records are updated. This can sometimes result in an Apex heap size too large error during the installation or reinstallation process.


If you experience this issue, it can be resolved by manually re-running the data update process using the DataMaintenanceManager tool. Run the following command in your Developer Console:


cooby.DataMaintenanceManager.run();


This command performs the same logic as FillRequiredFieldsBatch but processes a smaller batch size of 200 records instead of 2000, which helps avoid heap size issues.


How to Run the Command


  1. Open Developer Console

・Log in to your Salesforce org.

・Click the gear iconDeveloper Console.

  1. Execute the Command

・Open the Execute Anonymous Window (shortcut: Ctrl + E / Cmd + E).

・Paste the command below and click Execute:

cooby.DataMaintenanceManager.run();
  1. Verify the Batch Job

・Go to SetupApex Jobs.

・Confirm that the job has a Completed status.


We hope this document helps you better understand how Cooby works. For any concerns or questions regarding your Salesforce integration, kindly email us at support@cooby.co 💜



Updated on: 23/10/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!