The Salesforce API returns error messages when it can’t deploy metadata. Learn more about the error, what the cause is and how you can fix the problem.

If you see this Salesforce error message:

  • objects/Account.object: exceeded the allowed number of fields to track on a given entity

Try this quick fix:

  1. Turn off history tracking for fields where you don’t need it, to stay below the total limit of 20 fields.

This error is caused by Field History Tracking.

Salesforce has strict limits on the number of fields that you can customize. Most people are familiar with these field limits, for example, a Developer Edition org can have up to 500 custom fields, while Unlimited and Performance allows 800 custom fields in total. However, there is a much smaller limit for the Field History Tracking feature. Regardless of your Salesforce edition, history tracking cannot be turned on for more than 20 fields total, counting all fields of all objects in your org.

Other Solutions

If you can’t turn off history tracking for other fields, try one of the following alternative solutions.

Create a Custom Object to track history

For the very technically inclined, there is a cool Stack Overflow suggestion that explains how to create a Custom Object and an Apex trigger for tracking history, sidestepping the Salesforce feature completely. You can find example code there. This is a complicated solution for advanced users.

Contact Salesforce Support to increase the limit

Try to contact Salesforce support and ask for the limit to be increased. We have heard of people getting this limit increased to a maximum of 50 fields, but no more. This may not be available for all users. Your mileage may vary.


Blue Canvas can automate your deployments

Our app can automatically handle issues like this one. We’ve built a custom deployment engine that talks directly to Salesforce APIs and knows special workarounds for errors like this one and many others. We want your Salesforce deployments to be quick and simple so you can deploy in seconds instead of hours.

Try our automated deployments →