Synchronize with Server

When you update your home org in both the IDE and in the browser, your IDE project files might become out of date. When your project is out of sync, you have three options: use your project files, use the server files, or compare the differences between the two. To avoid inadvertently overwriting changes made outside your project, Salesforce recommends using the Synchronize with Server option whenever a conflict is detected. Synchronize with Server opens conflicting files in a diff tool so you can compare and merge them.

To synchronize your project with the home org:
  1. In the IDE, right-click the project name in the Package Explorer or other navigation view and select Force.com | Synchronize with Server. The first time you select this option, the IDE asks if you wish to display the Synchronize view. Click Yes. If any project files need to be synchronized, the project is displayed in the Synchronize view with a red arrow and X if there are changes in the project component, and with a blue arrow if there are changes in the home org. If nothing needs to be synchronized, the Synchronize view displays the message “No changes in 'Latest From Salesforce (Workspace)'”, and the number of conflicts at the bottom of the IDE all show 0.
  2. Resolve any reported conflicts. Open the project and the relevant folders until you find the component with a red arrow and X or blue arrow. Right-click the component and select one of the following options, depending on the action you wish to take:
    • Apply server to project: Completely replaces the component with the corresponding item in the home org.
    • Apply project to server: Completely replaces the corresponding item in the home org with the component in the project.
    • Open in Compare Editor: Opens the editor so you can inspect each conflict and choose to keep either the home org change or the component as it is for each conflict. You cannot make any other choice; that is, you cannot overwrite a change in the home org.
  3. When you’ve resolved all conflicts, click the save icon. Then close the Synchronize view.

The Synchronize view sometimes doesn’t recognize items in the home org that are not in the project. In these cases, right-click the project name and select Force.com | Refresh from server to refresh the components in a project.

Note