Deploying using Force.com IDE

Force.com IDE is a Salesforce-provided development tool that can be used to write Apex classes, Apex triggers, Lightning Components, and Visualforce Pages. It also allows you to download and edit the metadata of components.

Force.com IDE Installation

Before you install Force.com IDE, you need the following to be available and installed on your machine:

  • Java SE Runtime Environment (v1.5 or higher)
  • Eclipse IDE for Java Developers (Helios 3.6 or Galileo 3.5)

Perform the following steps to install the Force.com IDE for Eclipse Helios:

  1. Open the Eclipse IDE on your machine.
  2. Go to Help Install New Software:

    Force.com IDE Installation

  3. In the next window, click on the Add button. In the dialog box, enter Force.com IDE as the name and https://developer.salesforce.com/media/force-ide/eclipse42/ as the location. Then click on OK:

    Force.com IDE Installation

    Once you add the new repository, Eclipse will download the list of available plugins and display them in the Available Software section.

  4. Select the checkbox in front of Force.com IDE version 36.0, as shown in the following screenshot:

    Force.com IDE Installation

  5. Once you are done, click on Next.
  6. In the Review Licenses dialog, accept the terms and then click on Finish.
  7. Once the installation is complete, you will be asked to restart Eclipse. Click on Yes.

Creating a project and deploying it using Force.com IDE

Projects allow you implement version control and keep a backup of your work on a local machine.

A business scenario: David Guzman is working as a System Administrator at Universal Containers. In Chapter 2, Security Settings in Salesforce he created a permission set called Modify all Opportunities. Now he wants to migrate this object to a production org though Force.com IDE.

Perform the following steps to deploy components using Force.com IDE:

  1. Open Eclipse IDE on your machine and then go to File | New | Force.com project. To create a new project, enter the project name and Sandbox credentials, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  2. The next step is to select the metadata components. Click on Selected metadata components: and then click on Choose to select the components that you want to include in the project, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  3. The next step is to retrieve the components that you want to deploy to the production org. In this case, select the Modify_all_Opportunities permission sets, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  4. Once you're done with the components selection, click on OK.
  5. The confirmation screen will display all your selected metadata components. Click on Finish and you will get all your selected metadata components on your local machine:

    Creating a project and deploying it using Force.com IDE

  6. The next step is to deploy the project to the production org. To do this, right-click on Project Name and then go to Force.com | Deploy to Server, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  7. Then, the next step is to enter your production credentials and click on Next, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  8. The next step is to select the components that you want to deploy to the production org. For the current business scenario, select the Modify_all_Opportunities component, as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  9. As soon as you're done with component selection, the final step is to click on Next to deploy the metadata components to Production. If the deployment is successful, you will get a message as shown in the following screenshot:

    Creating a project and deploying it using Force.com IDE

  10. To close the popup, click on Finish.

Benefits of using Force.com IDE

There are a few advantages of using Force.com for deployment, and they are as follows:

  • Eclipse can be used to move metadata between orgs, for example, the Developer Edition org to a Sandbox.
  • You can use Force.com IDE to delete metadata from a production org, for example, deleting the Apex class or trigger.
  • It can be used to take a backup of the components as well as version control on your local machine.
  • It allows you to deploy only the components selected from your Force.com project.
  • It allows you to merge code with other developers to reduce deployment effort.
  • Force.com IDE can be used to deploy all types of metadata components.
  • You can easily integrate it with version control systems such as GitHub.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.153.63