Dynamics CRM and Azure Service Bus Queues Messaging over the cloud


Dynamics CRM and Azure service bus integration Part 3

Install the CRM To Bus plugin

Part 3 or our blog series details how to install and configure our plugin to react to a ‘customeraddress’ entity update and send the customer address along with the ‘fort_registrant’ entity values, PIN and Name.

  1. Install the Fortesium CRM-Connector CrmToBusPlugin.  The plugin exposes two entry points, a HttpServiceHost which uses the HTTP transport and the AzureServiceBusHost which utilises the Azure service bus transport. For this post we are only concerned with messaging via the ServiceBusHost.
  2. After installation register a new step, as you would any other plugin.   The plugin step takes its configuration from a fetchxml statement.
  3. The plugin unsecure configuration takes the following XML format.  The <fetch> was taken from a fetchxml statement, built using the excellent FetchXml Builder plugin for the XRMToolbox
      <entity name="customeraddress" >
        <filter type="and" >
          <condition attribute="customeraddressid" operator="eq" value="{0}" />
        <attribute name="city" />
        <attribute name="postalcode" />
        <attribute name="line1" />
        <attribute name="line2" />
        <attribute name="line3" />
        <attribute name="modifiedby" />
        <attribute name="createdby" />
        <attribute name="modifiedon" />
        <attribute name="createdon" />
        <link-entity name="fort_registrant" from="fort_registrantcontact" to="parentid" alias="fort_registrant">
          <attribute name="fort_pin" />
          <attribute name="fort_name" />
  4. The service point id ‘ebe54d31-b5c3-e711-8107-e0071b7fe041‘ can be found here
  5. The endpoint is the destination of the address for the message.  For example to send the query results of the fetch-xml to a MSMQ queue called ‘FMS-CRM-QUEUE’ on host ‘FortesiumAppServer’ the endpoint ‘FMS-CRM-QUEUE@FortesiumAppServer‘ is used.
  6. The filter condition, value ‘{0}’ is the current entity primary identifier
          <condition attribute="customeraddressid" operator="eq" value="{0}" /> 
          <!-- is the same as -->
          <condition attribute="customeraddressid" operator="eq" value="c1668630-0676-e711-80ff-70106faa6a31" />

3 thoughts on “Dynamics CRM and Azure Service Bus Queues Messaging over the cloud

Comments are closed.