Getting Started.

Note:
Before you start using XrmToolkit, it is a good idea to review the different settings that are available. Many of them will affect how items are saved locally and how they are updated or published to CRM. You can see the documentation regarding all the settings here.

XrmToolkit uses the standard Visual Studio solution and project templates for organizing your CRM Solution. XrmToolkit needs to create a link between your Visual Studio files and your CRM 2011, 2013, 2015 or 2016 files. This is accomplished in one of 2 ways:

Creating a new Solution

If you do not already have a Visual Studio solution that you are using, then the easiest approach is to use the 'Create New Solution' wizard.

Navigate to the 'XrmToolkit' menu item in Visual Studio and press the 'Create New Solution' button.


You will be prompted to enter in the Discovery URL of your Dynamics CRM organization. This can be found by going to Settings area in your CRM. Then select the 'Customizations' Sub-Area and then the 'Developer Resources' link. The Discovery URL is the outlined area in the image below:

You can also see Microsoft's document regarding your CRM URL's here.

After filling in the appropriate information, you can choose to save your password by selecting the 'Remember Password' option. This will save your password in an encrypted file (see the documentation here regarding the CRMSMU file).

Press the 'Next' button to continue. XrmToolkit will attempt to connect to the Discovery service and authenticate based on the provided credentials. If you receive an error at this point please see our troubleshooting documentation here.

The next area allows you to select an organization. If more than one organization is present you will need to manually select one from the dropdown, otherwise the only organization will automatically be selected for you. After selecting the organization, the 'Organization URL' will automatically populate for you. However, please note that this URL is the one that is stored in the CRM configuration database. This URL is correct most of the time but sometimes you will need to manually override this URL with the correct one. You can also optionally modify the 'User Friendly Name'. This is used to identify the organization in the menu's and other places while using XrmToolkit.

Press the 'Next' button to continue. XrmToolkit will attempt to connect to the Organization service and authenticate based on the previously provided credentials. If you receive an error at this point please see our troubleshooting documentation here.

At this point you will be asked to select a CRM Solution. This solution is used as the default solution when downloading existing files from CRM, as well as the solution that XrmToolkit uses when you create new files and upload them to CRM. These new files will automatically be added to the solution selected here. You can modify this selection later by modifying the settings at the organization level. For more information see here.

Pressing the 'Next' button will display a page where you can select either C# or VB.Net as your programming language. This will determine which project templates will be used when creating the projects.

The next page allows you to choose what types of items you would like to create or download from CRM. A separate project will be created for each type that you select here.

Note:
If one or more of the items is grayed out and not selectable it means that there are some missing prerequisites or that the specific project type is not supported in your version of Visual Studio. In the case of 'Reports', either BIDS or SSDT must be installed. For more information please see our documentation here.

After selecting the types, press the 'Next' button to continue. This will show the following page:

Please specify a name and location for your Visual Studio solution, optionally specifying to create a directory for the solution. Press the 'Finish' button to create the solution and to begin the Project setup wizard.

For each of the previously selected project types, a wizard will guide you through the setup process. The following window is asking to specify the project name and location for the 'CRM Assets Project' type.

For more information on each of the different project types and how to set them up, see their respective documentation:

Link to an existing Solution

If you already have a Visual Studio solution containing CRM files, you can link this Visual Studio solution to CRM. To do so right-click on the solution node in the Visual Studio Solution Explorer. Select the 'Link to a CRM Organization' button found under the 'CRM' sub-menu as shown here:

Doing so will initiate the same CRM Connection wizard shown above here. After completing the Solution Connection wizard your Visual Studio Solution will now be linked to CRM.