Create a Developer or Sandbox Org

You can run Apex in a production org, a developer org, or a sandbox org. You can develop Apex in a developer org or a sandbox org, but not in a production org.
  • Production org—An org that has live users accessing your data
  • Developer org—An org created with a Developer Edition account
  • Sandbox org—An org created on your production org that is a copy of your production org
Note

Note

Apex triggers are available in the Trial Edition of Salesforce. However, they are disabled when you convert to any other edition. If your newly signed-up org includes Apex, deploy your code to your org using one of the deployment methods.

You can't develop Apex in your Salesforce production org. Live users accessing the system while you're developing can destabilize your data or corrupt your application. Instead, do all your development work in either a sandbox or a Developer Edition org.

If you aren't already a member of the developer community, go to http://developer.salesforce.com/signup and follow the instructions to sign up for a Developer Edition account. A Developer Edition account gives you access to a free Developer Edition org. Even if you already have a Professional, Enterprise, Unlimited, or Performance Edition org and a sandbox for creating Apex, we strongly recommend that you take advantage of the resources available in the developer community.

Note

Note

You can’t modify Apex using the Salesforce user interface in a Salesforce production org.

To create a sandbox org:

  1. From Setup, enter Sandboxes in the Quick Find box, then select Sandboxes.
  2. Click New Sandbox.
  3. Enter a name (10 characters or fewer) and description for the sandbox.
    We recommend that you choose a name that:
    • Reflects the purpose of this sandbox, such as QA.
    • Has only a few characters, because Salesforce appends the sandbox name to usernames on user records in the sandbox environment. Names with fewer characters make sandbox logins easier to type.
  4. Select the type of sandbox you want.

    If you don’t see a sandbox option or need licenses for more, contact Salesforce to order sandboxes for your org.

    If you reduce the number of sandboxes you purchase, you are required to match the number of your sandboxes to the number you purchased. For example, if you have two Full sandboxes but purchased only one, you can’t create a Full sandbox. Instead, convert a Full sandbox to a smaller one, such as a Developer Pro or Developer sandbox, depending on which types you have available.

  5. Select the data to include in your Partial Copy or Full sandbox.
    • For a Partial Copy sandbox, click Next, and then select the template you created to specify the data for your sandbox. If you have not created a template for this Partial Copy sandbox, see Create or Edit Sandbox Templates.
    • For a Full sandbox click Next, and then decide how much data to include.
      • To include template-based data for a Full sandbox, select an existing sandbox template. For more information, see Create or Edit Sandbox Templates
      • To include all data in a Full sandbox, choose whether and how much field tracking history data to include, and whether to copy Chatter data. You can copy from 0 to 180 days of history, in 30-day increments. The default is 0 days. Chatter data includes feeds, messages, and topics and is used in many components that affect your sandbox copy. Decreasing the amount of data you copy can significantly speed sandbox copy time.
  6. To run scripts after each create and refresh for this sandbox, specify the Apex class you previously created from the SandboxPostCopy interface.
  7. Click Create.
    Tip

    Tip

    Try to limit changes in your production org while the sandbox copy proceeds.