+ Start a Discussion
CloudyJoshCloudyJosh 

Cannot create new apex class

I get an error "Cannot create apex class in an active organization" whenever I try to create one, even though developer mode isn't checked in the user information page. What's going on?
Best Answer chosen by CloudyJosh
pconpcon
You cannot create Apex Classes in a non-developer edition org in production.  You have to create a sandbox [1] and then do your development there.  Then deploy it from your sandbox to production.

[1] https://help.salesforce.com/apex/HTViewHelpDoc?id=create_test_instance.htm

All Answers

pconpcon
You cannot create Apex Classes in a non-developer edition org in production.  You have to create a sandbox [1] and then do your development there.  Then deploy it from your sandbox to production.

[1] https://help.salesforce.com/apex/HTViewHelpDoc?id=create_test_instance.htm
This was selected as the best answer
CloudyJoshCloudyJosh
Thank you!
CloudyJoshCloudyJosh
Do you know why it says pending? Does an email get sent to the user?
pconpcon
It takes it a little while to actually copy the instance over.  Depending on the size of the org and the type of sandbox, this can take anywhere from 30 minutes to 2 weeks.  You should get an email to the address associated with the User that started the sandbox copy when it's complete.
CloudyJoshCloudyJosh
2 weeks... crazy. Hopefully this one isn't too big. Thanks man.
pconpcon
Yeah, we've had full sandbox copies take almost a month before.  But that's for an old and large org and it copies all of the data with it.