How to Pull changes from Salesforce
Working with cloud-based environments applies some specific rules on interactions with the codebase. It's somehow similar to version control systems when some code is stored both on a server and locally, and it is likely to have other developers working on the same code base simultaneously.
The Pull functionality helps you to get from an org the changes that were made by other developers.
In addition, you can use the Pull functionality to get additional project metadata components, that you didn't download during the creation of a project. Open the Project metadata components window and select the components you want to download within your project. The next time you pull files from your Salesforce org, the new files that you subscribed for will be downloaded automatically.
When pulling changes from Salesforce, The Welkin Suite checks each file to see if its version on a server was changed since your last pull (or project creation) and finds the files that were deleted or added on a server.
During the pull TWS makes the following steps:
- updating chosen items,
- removing items that were deleted in an organization,
- creating new items that were added to an organization (if you subscribed on all the new items for a metadata, during creating a project or manipulating with project metadata components).
To start the pulling process you can:
When you execute this command, you will see the Pull Wizard window with a list of all the files that are already present in your project and checkboxes next to them. These checkboxes determine if the IDE should check for changes in the selected files. This can be handy when you are working on a big project, which is frequently updated but you’re focused on some separate feature and don’t want to waste your time downloading lots of changed files.
- Run pulling process from the Main Menu:
Project ⇒ Pull from Salesforce.
- Run the pull from the context menu of any opened file in the code editor.
Depending on where you run the pull, selected files will be different:
- if it's a project, all the items will be chosen;
- if it's a folder, the items that are in the folder will be selected and placed at the top of the set of the items;
- if it's a file, the file will be selected and moved to the top of the list of the items,
- if you start the pull process from the Main Menu, any file won't be selected.
Only the files that are selected in that list will be verified for the update during pulling. Press Next button to start the pull process.
Once The Welkin Suite completes all interactions with the server, it will notify you if there are any changes.
If there are no changes, the IDE will show that your project is up to date.
In another case, if any changes are pulled from Salesforce, you'll see the changes that were pulled.
If any file is deleted in Salesforce, the IDE will ask you whether you want to delete this file locally. If you want to leave the deleted file locally, just unmark it.
If there are some new files added in Salesforce and you've subscribed to this metadata type, these files will be automatically downloaded during the pull process. You'll see them in the summary message with the mark Downloaded.
If there are any conflicts (a file has local and server changes), the IDE will show you a list of these conflicts and options to resolve them. These conflicts may occur if you work on some functionality simultaneously with your colleagues, and the file was changed by you and by another developer (and his version is already present on the org).
The last step is to apply changes that were made during the pull. After this, the IDE shows you a summary of these changes.
Now you can continue working on your project with the latest changes.
In this section:
This also may be useful: