This article discusses the difference between CRM on Premise and Cloud, then focuses on the usage of Talend with Microsoft Dynamic CRM in general but with cloud in particular. For a cloud connection, it will show how to create the native application and get all the value for the field that are needed.
To create a Microsoft Dynamic CRM custom entity, you must have a Microsoft Dynamic CRM administration account.
CRM Online: This is a SaaS model. If you choose CRM Online, this means that your CRM system will be in Microsoft’s Cloud.
CRM On-premise: This traditional mode is where CRM is hosted by your company or by another hosting partner/vendor.
To connect Talend Studio with Microsoft CRM cloud version, you need to create a native application that you will use in your Talend component to be able to connect. Below are the steps:
Log in to the Azure portal: https://portal.azure.com.
Enter the username and password, then the screen of Microsoft Azure screen appears.
Click Azure Active Directory.
Click App registrations.
Click New application registration.
Click Create to create a Native Web App. Enter a Name (for example, kb_test_native_app1), click the drop-down and choose Native, then enter the Redirect URI (for example, http://localhost)
Click Create to create a Native App.
Scroll down then click kb_test_native_app1.
Click Required permissions.
The Application ID is shown above. You will need it in the tMicrosoftCrmInput/tMicrosoftCrmOutput components to connect CRM 2016 ODATA.
Click Grant Permissions to grant access permission.
Click Add to add application.
Click Select an API, then choose Dynamics CRM Online to add Dynamics CRM Online.
Click Select, then Done.
Check the box next to Access CRM Online as organization users.
Click Select, then Done.
Permission is granted for the Windows Azure Active Directory and Dynamics CRM Online.
After all these steps you are set to connect to your CRM in cloud using your username, password and the application ID that you just created. But to insert data into your custom entity you need to create and grant all the needed permissions, as shown in the next steps.
Once you are done with the application creation, follow these steps to create the custom entity that you will be using.
Note: Assume you already have an online Microsoft Dynamics CRM account access granted.
Log into Office by clicking on the URL https://www.office.com
Click Open the app launcher to access Office 365 apps.
Click Get more apps.
Click Dynamics 365 to add a Dynamics CRM.
Login into the Dynamics CRM by copying and pasting the URL https://home.dynamics.com/.
Click Dynamics 365.
After logging in, click the drop-down arrow in Sales:
Click Customize the System.
A new window will appear as shown below:
Expand the arrow next to Entities:
Click the drop-down arrow next to New, then choose Entity.
The following window will appear. Fill in the entity name and the display and permission as shown below:
Then click Save and close.
Scroll down and expand the entity just created (for example, test_employee2).
Click Fields, then click New.
Enter the field name (for example, firstname), the data type, and the field type. Click Save and New to create another field name.
Name the new field lastname, then click Save and Close.
You will see that the two new fields you just created are highlighted:
Click Forms, then click New > Main Form.
The New Form window will appear. Drag firstname and lastname from the Field Explorer on the right to the General pane as shown below:
Click the entity you just created (test_employee2) then click Publish to publish the entity.
Click the checkbox next to Access Teams to set the access permission for the test_employee2 entity.
Check that test_employee2 appears in Sales.
The following example discusses the online scenario with 2011 and 2016 just to illustrate. The connection to your on-premise CRM will just require the credentials and host to connect.
To connect, drag and drop your CRM component and fill out the requirement field. But behind the scenes, the following points are what you need to know:
The org.talend.ms.crm.MSCRMClient object collects all above credentials, then invokes the Microsoft authenticate method in the SecurityData object to connect to the Microsoft Dynamics CRM 2011.
Here Talend will be using the ODATA protocol to communicate with your CRM. Below are what is happening behind the scenes:
The org.talend.ms.crm.odata.DynamicsCRMClient object invokes the Microsoft AuthenticationContext.acquireToken() to get the connection.
Input column names in the schema to write data to the new_test_employee2 custom entity.
Write data to CRM 2016 ODATA:
Read data from CRM 2016 ODATA:
For any connection issues you may encounter during your testing, below are a few pointers that can help you in your debugging: