Newer Version Available

This content describes an older version of this product. View Latest

Deploying Apex to a Sandbox Organization

Sandboxes create copies of your Salesforce org in separate environments. Use them for development, testing, and training without compromising the data and applications in your production org. Sandboxes are isolated from your production org, so operations that you perform in your sandboxes don’t affect your production org.

To deploy Apex from a local project in the Force.com IDE to a Salesforce organization, use the Component Deployment Wizard. For more information, see Force.com IDE.

You can also use the deploy() Metadata API call to deploy your Apex from a developer organization to a sandbox organization.

A useful API call is runTests(). In a development or sandbox organization, you can run the unit tests for a specific class, a list of classes, or a namespace.

Salesforce includes the Ant Migration Tool that allows you to issue these commands in a console window, or your can implement your own deployment code.

The Force.com IDE and the Ant Migration Tool are free resources provided by Salesforce to support its users and partners, but aren't considered part of our services for purposes of the Salesforce Master Subscription Agreement.

Note

For more information, see Using the Ant Migration Tool and Deploying Apex.