I have an org which has

Percent of Apex Used: 89.64%

Just curious to know what happens if we reach 100% of apex code.

Does the salesforce allow the to write code more than that?


1 Answer 1


You will receive an error message when trying to save files of

Error: The total size of apex code in this application after removing comments exceeds the maximum character size of 3,000,000

and the files will not submit to the server. You can contact your account executive and may be able to open a discussion to add to this limit if it is deemed appropriate.

Just for you I did this in my Dev org to screenshot the message in action:

Error Message

It should be noted also that if any individual Apex Class exceeds the 1,000,000 character limit you will get a message like this:

Class limit

  • 5
    Salesforce can increase this but will likely do so conditionally and even investigate your code. I believe one of the conditions is that all your test code is in separate classes. Mar 5, 2014 at 16:48
  • Wrote all of the test cases individually in a new file for every class in apex
    – Ugesh Gali
    Mar 6, 2014 at 19:20
  • 3
    Who on earth just down-voted this answer??! May 7, 2014 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .