Loading

Proactive Alert Monitoring: Apex Code Character Limit

Data pubblicazione: Aug 7, 2026
Descrizione

Every Salesforce org has a maximum limit on the total number of characters allowed across all Apex classes and triggers. When this limit is reached, no new Apex code can be deployed and existing code cannot be expanded — effectively blocking all development and deployment activity that includes Apex. With the Signature Success plan’s Proactive Monitoring, Salesforce proactively monitors your organization's Apex code character consumption and alerts you when utilization is approaching the limit, giving you time to clean up unused code or plan for additional capacity before deployments are blocked. In addition, on the Salesforce Help site Designated contacts and above can see your realtime metrics, alerts & more.

 

Risoluzione

Causes

  • Accumulation of unused Apex classes and triggers — Code that is no longer in use remains counted against the character limit if it has not been removed from the org.

  • Large auto-generated or third-party package code — UnManaged packages and auto-generated classes can contribute significant character counts that accumulate over time.

  • Rapid development or frequent deployments — Orgs with active development cycles may approach the limit faster as new classes and triggers are added without corresponding cleanup of deprecated code.


Resolution

Remove Unused Apex Code

Review your org for Apex classes and triggers that are no longer in use. Check code coverage reports to identify classes with 0% test coverage, which may indicate unused code. Removing obsolete classes and triggers is the most direct way to recover character capacity. Review the Apex Developer Guide for guidance on managing Apex code in your org.

Optimize Large Classes

Identify large Apex classes that may be candidates for refactoring or consolidation. Splitting monolithic classes into smaller, purpose-built classes can help manage overall code size, and removing redundant logic across classes reduces duplication.

Request Additional Capacity

If your organization has a legitimate business need for additional Apex code character capacity beyond the standard limit, contact Salesforce Support. See this help article for details on requesting a limit increase.

Annual Technical Health Review

Customers on the Signature Success plan can request an annual technical health review to get expert guidance on Apex code management, architecture best practices, and strategies for keeping code size within org limits.

 

Risorse aggiuntive

Additional Resources

Help and Developer Resources

Useful Trails

Numero articolo Knowledge

005388771

 
Caricamento
Salesforce Help | Article