Synchronize with Server
When making changes to your home organization in both the IDE and in the browser, your IDE project files may 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 Synchronize with Server 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 organization:
- In the IDE, right-click the project name in the Package Explorer or other navigation view and select . 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 organization. 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.
- 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 organization.
- Apply project to server: Completely replaces the corresponding item in the home organization 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 organization 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 organization.
- Click the save icon when you have resolved all conflicts. You may close the Synchronize view when all conflicts are resolved.