My account type is Enterprise Edition, i want to create new apex class, but when i try to create new apex from developer console, it shows the error "Cannot create apex class in active organization". I can login to 'developer.salesforce.com', but when i go to "My Developer Account", and try to create new apex class, still showing error.


You can't create or edit Apex or Visualforce in production organizations. You need to create your work in a sandbox and migrate it with a change set, or use an IDE like Eclipse, Illuminated Cloud, etc., to perform a deployment. Keep in mind that when deploying Apex, you will be required to include unit tests for your code to achieve the standard 75% code coverage metrics.

While you can write code in a Developer Edition, you will need an IDE or some other deployment tool to move it to Production, as Developer Editions cannot establish a change set deployment connection. Note that you login to a Developer Edition of Salesforce with your Developer Edition credentials at login.salesforce.com. That's not the same as a Developer Forum or Trailblazer Community account.

If you're not familiar with sandboxes or change sets, I would recommend completing the Change Management module on Trailhead.

  • thanks for reply, From where i can access sandbox ? – uzman Sep 12 '18 at 11:45
  • 1
    @uzman, try searching "create sandbox salesforce". You'll probably find this Salesforce doc: Create a Developer or Sandbox Org – Scott Pelak Sep 12 '18 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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