How do I fix a code statement limit exceeded error?

Last updated: December 13, 2016

We're unable to sync some of your data because you have exceeded the number of code statements allowed by Salesforce in a day.

This is error is usually caused by a third-party system associated with your Salesforce account, or inefficiencies with customers' own trigger code. For example, if you have an installed system that de-duplicates records in Salesforce, it might conflict with regular HubSpot syncing. Please try uninstalling any third-party systems that might be causing a conflict and try syncing again. If this error persists, please report it in Salesforce first by going to Your Name > Set Up > Monitoring > Debug Logs or Logs > Debug Logs and then call HubSpot Support.

Customers with their own custom trigger code should review and make sure it's properly bulkified. This means that all data manipulation statements must be performed outside of a loop. Customers who hit these kinds of governors are often trying to execute the same kinds of things which contribute to governors, but from within loops. Instead of doing this, they should focus on using loops to build sets of records, then perform one single DML operation on that set outside of the loop.

Was this article helpful?

If you still need help you can get answers from the , or to contact support.

Free Inbound Marketing Training Learn inbound marketing techniques that range from creating content, using  social promotion, converting and nurturing leads, and all the way to marketing  to your customers. Start the course