In this example were showing how you can Import/Synchronise data from a SQL Server Database into an instance of CRM 2011 with custom entitles and Data Synchronisation Studio.
We're going to import Sales Order History from the Adventure Works database and relate each Order History line to an Account in the CRM system.
Using the Query below we can pull out the Sales Order Header Lines and in this example we are going to relate the Contact ID back to the Account in CRM (previously we imported the Contacts into the Account Entity using the rowguid as the accountid in the CRM system)
This is the typical result we get from the Query
Next we create a new Entity in CRM with 2 custom fields, Amount and Account:
We can then simply map the Data in Data Sync between the Source SQL Query and CRM entity like this.
Compare and Sync the Data
Once the Data is imported you can then create a view to view the list of Sales or records.
Sales order item showing Account Relationship connected.