> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.cooby.co/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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 icon** → **Developer Console**.
2. **Execute the Command**
・Open the **Execute Anonymous Window** (shortcut: Ctrl + E / Cmd + E).
・Paste the command below and click **Execute**:
```
cooby.DataMaintenanceManager.run();
```
3. **Verify the Batch Job**
・Go to **Setup** → **Apex 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__](mailto:support@cooby.co) 💜

