Implementing your changes made with Connector SDK (5th in SDK series)

This is the final post in a 5-part series covering the basics of the SDK for Connector.

Installing Connector

When you get your custom implementation or extensions to build in Visual Studio and you want to test their functionality in Connector, there are some steps involved in preparing your Adapter for use with Connector. This post will help you to name the files correctly, put the adapter files in the correct locations, and configure the SampleAdapter.

How do I name the Connector artifacts?

The adapter artifact can be named whatever makes sense for your specific implementation or extension. The ObjectProviders can be named whatever makes sense, although it typically makes sense to name them using Object + ObjectProvider so that they are easy to understand. The ObjectProvider configuration files must be named [Object]ObjectProvider.config so that they match with the ObjectProvider filename.

When you build the SampleAdapter solution, you will notice that the output DLL is given the name using the full namespace such as Adapter1. It is important that the output DLL takes the name of the full namespace. This makes it easier for the Dynamics CRM Adapter to locate the new adapter.

Where do I put the adapter artifacts so that the Adapter is available?

You need to include these things for the Connector client to recognize and load your adapter:

  • ·         Adapter and ObjectProviders in a DLL – For example Dynamics.Integration.SDK.Sample.SampleAdapter.dll
  • ·         ObjectProvider Configuration Files – For example a folder called “ObjectConfigs” with files such as “SampleCustomerObjectProvider.config” and “UofMScheduleObjectProvider.config”.

Once you have located these files in the “bin” folder of your project directory, you can copy them to the “Adapters” folder of your Dynamics CRM Adapter installation location. By default, this folder is located at $(ProgramFiles)\Microsoft Dynamics\Microsoft Dynamics Adapter\Adapters\.This is where you need to put your Adapter DLL file and the folder containing the ObjectProvider Configuration files named appropriately. Once you have done this, you should be able to open the Dynamics CRM Adapter client application and a wizard with help you configure and activate the new adapter.

How do I configure and activate the SampleAdapter provided with the SDK?

The SampleAdapter project that comes with this SDK can be opened in Visual Studio 2008 or 2010. Once you open the project in Visual Studio, you can build the project. The output of the project can be found in the project directory in the “bin” folder. Select the “Dynamics.Integration.SDK.Sample.SampleAdapter.dll” file and the “ObjectConfig” folder and copy and paste them in into the $(ProgramFiles)\Microsoft Dynamics\Microsoft Dynamics Adapter\Adapters\ folder. Then, open the “Microsoft Dynamics CRM Adapter” client application. When you open this application, you should be prompted with a window asking you to configure a new SampleAdapter. At this window, enter the username to connect to the GP Web Service (DOMAIN\username), the password for this user account, and the URL for the GP Web Service (<localhost/DynamicsGPWebServices/DynamicsGPService.asmx> by default). Then, you should be able to click the save button.

Next, right-click on the “Home” text on the left-hand side in the top corner. Select “create new integration” from the menu. Select the “blank” option. On Application 1, select the “SampleAdapter” and the appropriate company and on Application 2 select “Microsoft Dynamics CRM 4.0”. Then, click the create button. Now, you must add maps and activate them. Right click the “maps”
text under your new integration and select “Create new map.” Then, you need to decide if you want to try the SampleCustomer or UofMSchedule map.

  • ·         If you want to use the UofMSchedule map, the source entity should be “UofMSchedule” and the destination entity should be “Unit Group”. Select create. Then, map the fields in the map and configure the map to run at a regular interval (300 seconds or so) and activate the map.
  • ·         If you want to use the SampleCustomer map, the source entity should be “Contact” or “Account” and the destination entity should be “SampleCustomer.” Click create. Then, map the fields in the map and configure the map to run at a regular interval (300 seconds or so) and activate the map.

After the maps run the first time, you should be able to see the objects synchronize.