Sunday, November 27, 2016

Enhancements to Client side Notifications in Dynamics 365

Microsoft introduced client side notifications in CRM2013. Dynamics 365 has introduced enhancements to this functionality.
A new method addNotification has been added to to the client side API. This method can:
  1. Display a error or recommendation notification. In the earlier version the only option available was error notifications.
  2. It also allows you to specify and execute actions based on the notification. The new method not only display the notification, it also display 2 buttons:
    • “Apply” to execute the action
    • “Dismiss” to close the notification


The following sample code will display recommendation notification if there are numbers in the “name” of the account. If the user clicks on “Apply” button, it will remove the numbers from the name and clear the notification. If the user clicks on “Dismiss” button, the notification will be closed.
 function addNotification() {  
   //get the name control  
   var myControl = Xrm.Page.getControl('name');  
   //get the name attribute  
   var accountName ='name');  
   //get the value name attribute  
   var accountNameValue = accountName.getValue();  
   //if the account name is null then return  
   if (accountName.getValue() == null) {  
   //regular expression to find numbers  
   var r = /\d+/;  
   var s = accountNameValue.match(r);  
   //if match the display the message  
   if (s != null) {  
     var actionCollection = {  
       message: 'Remove the numbers from the name?',  
       actions: null  
     actionCollection.actions = [function () {  
       //remove the numbers  
       accountName.setValue(accountNameValue.replace(/[0-9]/g, ''));  
       messages: ['Number/s in the account name'],  
       notificationLevel: 'RECOMMENDATION',  
       uniqueId: 'my_unique_id',  
       actions: [actionCollection]  



When the user clicks “Apply”, the system removes the number 7 from the name.

This functionality will be very useful in number of scenarios, for e.g. validating a field and recommending a value, moving the focus to specific tab or field, validating the field value on the parent entity, and opening the parent form to update the fields etc..

Wednesday, November 16, 2016

Interesting integration scenarios for Dynamics 365

The release of Dynamics 365, along with the general availability of Microsoft Flow, Power Apps with CDM(Common Data Model), and the vast range of Azure services have opened up a whole new world of integrated solutions.

I will go through the following 3 scenarios to show case the integration possibilities for Dynamics 365. This blog will only discuss the architecture of the solution, not the actual implementation. The aim of this blog is highlight the solution possibilities using Dynamics 365 and Azure cloud.

Integration of Dynamic 365 with Power apps

Technologies used

  • Dynamics CRM 365
  • Microsoft Flow
  • Common Data Model (Part of Power Apps)
  • Power Apps
  • PowerBI

Solution Overview

The following depicts the solution architecture of Dynamics 365 and PowerApps.
  1. A record is created/updated in Dynamics 365 which triggers Microsoft Flow workflows to create/Update the record in CDM.
  2. The PowerApps’s mobile app connected to CDM presents the data to end users.
  3. The end users read,create or update the data on the mobile app.
  4. The changes are saved in CDM that triggers the Microsoft Flow workflows to create/update the data in Dynamics 365.
The data in CDM can be used by PoweBI for analytics. You can also add the data into CDM from different sources to get the consolidated view of the data.

Integration of Dynamics 365 with Microsoft Bot framework

Technologies used

  • Dynamics CRM 365
  • Microsoft Flow
  • SharePoint Online
  • Azure Storage
  • Azure SQL database
  • Azure Search
  • Cognitive Services
  • Microsoft Bot Framework
  • Skype.

Solution Overview

I am very impressed with this solution. This scenarios depicts the business process of an insurance company where users have applied for the policy online. The business process workflow creates profiles in Dynamics 365 and stores the customer application in SharePoint Online.

A Microsoft Flow workflow will push structured data into the Azure SQL Database and the unstructured data into Azure Blobs.

Azure Search crawls the data at regular intervals and keeps it current for querying.

End users interact with the Bot application using Skype. The Bot application processes the user requests without any human interaction using cognitive services.

The whole solution is taken from the following blog: Please check the blog for solution details.

The following depicts the architecture of the solution. The diagram is taken from the same blog.

Integration of Dynamics 365 with Azure Search (Relevance Search)

Technologies used

  • Dynamics CRM 365
  • Event Hub
  • Azure Search

Solution Overview

This solution is a preview feature available in Dynamics 365 named “Relevance Search”. Relevance search delivers fast and comprehensive search results in a single list sorted by relevance. It is designed to boost Dynamics 365.

All this information is available at TechNet.

The following diagram depicts the solution architecture of the relevance search. The diagram is taken from the Microsoft TechNet site
Relevance Search

Thursday, November 10, 2016

Duplication Detection Bugs in Dynamics 365

Duplicate Detection functionality has a bug in Dynamics 365. If you run a duplicate detection job or try to create a duplicate record, the system will display an empty duplicate detection dialog as shown in the screen shot below.


The Updated Record and Potential Duplicate Records grids do not show any records.

Also if you are updating records in the editable grid the system does not trigger the duplicate detection rules. The system will not display any duplicate detection dialog.