Deploying Components to Production

Prerequisites:

In this step, you deploy the Apex code and the custom object you created previously to your production organization using change sets.

This procedure doesn't apply to Developer organizations since change sets are available only in Unlimited, Enterprise, or Database.com Edition organizations. If you have a Developer Edition account, you can use other deployment methods. See Deploying Apex.

  1. Click Your Name | Setup | Deploy | Outbound Changesets.
  2. If a splash page appears, click Continue.
  3. In the Change Sets list, click New.
  4. Enter a name for your change set, for example, HelloWorldChangeSet, and optionally a description. Click Save.
  5. In the change set components section, click Add.
  6. Select Apex Class from the component type drop-down list, then select the MyHelloWorld and the HelloWorldTestClass classes from the list and click Add to Change Set.
  7. Click View/Add Dependencies to add the dependent components.
  8. Select the top checkbox to select all components. Click Add To Change Set.
  9. In the change set detail section of the change set page, click Upload.
  10. Select the target organization, in this case production, and click Upload.
  11. After the change set upload completes, deploy it in your production organization.
    1. Log into your production organization.
    2. Click Your Name | Setup | Deploy | Inbound Change Sets.
    3. If a splash page appears, click Continue.
    4. In the change sets awaiting deployment list, click your change set's name.
    5. Click Deploy.
In this tutorial, you learned how to create a custom object, how to add an Apex trigger, class, and test class, and how to test your code. Finally, you also learned how to upload the code and the custom object using Change Sets.
© Copyright 2000–2012 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.