Dynamics CRM – Azure Integration (Part 2) : Create Dynamics CRM Service Endpoint

Detailed explanation on Dynamics CRM – Azure Integration. Technologies, mechanisms, tools and issues are enclosed under three topics in three connected posts.

Connected Posts:
Dynamics CRM – Azure Integration (Part 1) : Create Azure Service Bus Namespace
Dynamics CRM – Azure Integration (Part 2) : Create Dynamics CRM Service Endpoint
Dynamics CRM – Azure Integration (Part 3) : Explore Service Bus Messages


Detecting a Change in Dynamics CRM Records

In Dynamics CRM there are few ways of detecting record changes. It is really important to track\trigger changes in Dynamics CRM systems when synchronizing data between systems.

Change Tracking is a new feature comes with latest Dynamics CRM version and this feature can be used to get a bulk of records changed in an entity. It always provides changes compared to the last retrieval  of changes. Also, this will not raise the change as soon as it happens. Some code has to be executed externally and should get the changed records from the specific entity.

CRM Workflow executions in an event is another solution of detecting changes. With the real-time workflows, the workflow can be started before or after the change.

In this post, we discuss sending Plugin Execution Context to Azure and solving issues related to that.

 

Get the Plugin Execution Context Out

Plugins can be registered to track record changes. Plugin execution context has lots of information on the record change such as data changed, images, plugin step information etc. If we need to get the record changes and related information out of CRM we can use plugins and perform any action on that data. Also, we can integrate Dynamics CRM and Windows Azure using a Service Endpoint to Azure.

PluginExecutionContext

Plugin steps can be created for different entities at different events of changes. This feature can be used to synchronize\distribute data resides\changed in Dynamics CRM with other applications, services or with devices.

 

 

Create Dynamics CRM Service Endpoint with Plugin Registration Tool

Following steps can be used to create a Service Endpoint to a Queue in Azure Service Bus.

RegisterNewServiceEndpoint

 

Azure Service Bus Namespace and Queue\Topic name should be given under Service Endpoint Registration.

Solution Namespace : Namespace name under Service Bus

Path : Name of  Queue\Topic

ServiceEndpointRegistration.PNG

 

Management Key can be taken from Azure Namespace Connection in Azure Portal. Certificate File and Issuer Name can be taken from Dynamics CRM application.

ACSConfigurations.PNG

 

Issuer Name can be copied and Certificate can be downloaded from Developer Resources page in Dynamics CRM.

Settings >> Customization >> Developer Resources

Issuer

 

Default Key can be taken from Azure Namespace Connection Information. We will get Default Key only if you create the Namespace using PowerShell. Refer Previous Post

ConnectionInformation2

 

Configure ACS : Allow Azure Fabric ACS to post from CRM and it updates the ACS Management Portal options for you.

ConfigureACS.PNG

 

ID field gets updated as follows.

ReadyToAuthenticate

 

After clicking “Save & Configuration”, it starts Verifying Authentication and shows the Results.

VeryfyingAuthentication

 

VerifyingSuccess

 

Service Endpoint shows as follows.

ServiceEndpointCreated

 

Adding a Step to the Service Endpoint

Synchronous Steps are not allowed under Service Endpoint. It will raise an error  message as follows.

OnlyAsynchronousMessage

PluginStep.PNG

Advertisement

Author: Indika Abayarathne

MSc in IT [University of Colombo] Solutions Architect | Consultant Technologies: Power Platform | Dynamics CE | Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: