Apex Code Character Limit (Part I)

Apex Code Character Limit


What is Apex Code Character Limit?

As we know, Salesforce works on a multi-tenant environment. So it provides common resources to every org.
  • If we speak in terms of writing Apex code in our Org, due to multi-tenant architecture design, we do have a limit on code characters for every org. 
  • That means, Salesforce literally counts each and every character that we use to write any code. This limit is called Apex Code Character Limit.
  • The code character limit is almost the same for every org. As of now (after Summer'18 release), the code character limit would be 6 Million.

  1. This indicates that any developer can write and develop code in their org up to 6 Million characters.
  2. For suppose, if a developer has exhausted the provided code character limit, then an error would be thrown stating that "The total size of apex code in this application after removing comments exceeds the maximum character size of 6000000".
  3. So we cannot write any single character of code once after reaching this limit.

Where do we find this code character limit in our Org?

We can find our Organization's code character limit in 2 different ways.
  • Login to your Org --> Go to Setup --> Look for the Custom Code section --> Select the "Apex Classes" --> Then we can see all Apex classes in our Org --> There is an indication in Yellow Box stating that "Percent of Apex Used" and the total apex code character limit to our org.



  • Login to your Org --> Go to Setup --> Look for the Environments section --> Select the "System Overview" option --> Then look for the Business Logic section --> There it will show the "CODE USED" i.e. how many characters that we used from the total allocated characters.

Using the above mentioned ways, we can be able to find our Organization default Code Character Limit and the limit that we exhausted.

That's all for this first part. We can learn more in Second Part (https://offthecloud.blogspot.com/2020/04/apex-code-character-limit-part-ii.html).

Happy Learning!



Comments

Popular posts from this blog

Deployment in Salesforce using Change sets

SFDX Developer Guide

REST API using Workbench

Customize Salesforce Login Page