function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Error in Apex Code


While writing apex coding, i am getting the below error. if i comment the existing class it is accepting upto some extent. even when i validate this with production there also i am getting the same error. please help me. 

Error: The total size of apex code in this application after removing comments exceeds the maximum character size of 1000000.


Hi Padma,


 Your apex code  size is exceeded than the 1MB (limit by salesforce).

 So for all the test classes use istest annotation so that these classes won't fall under actual memory category.

 For more help have a look at Apex Guide.




hi srinu


Thanks for ur solution. it works fine.