Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 21 down vote accepted

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

share|improve this answer
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. – Samuel De Rycke Mar 5 '14 at 16:48
Wrote all of the test cases individually in a new file for every class in apex – Ugesh Gali Mar 6 '14 at 19:20
Who on earth just down-voted this answer??! – Simon Lawrence May 7 '14 at 14:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.