Dynamics 365 Saturday – London 2018

This weekend there is a great community event in London for the Dynamics professionals and fans: DYNAMICS 365 Saturdayrtb_blog_d365SaturdayLondon_Page.png

The event is actually running for 2 days, starting on Friday (today!) with the Hackathon and multiple activities around it:


Then on Saturday we will have more presentations, including mine: Dynamics 365 Version 9 New Features & Deprecations


During this presentation, that I’ll be sharing with my MVP colleague Baris Kanlica, we will cover the main features coming with the new version of Dynamics 365 Customer Engagement (our old CRM) and highlight those that have been deprecated.


Microsoft is really supporting the event this year and James Phillips, Dynamics Corporate Vice President, will kick off the event.


We hope you will enjoy it and learn something useful ūüôā

Capture contact images with Xrm.Device.captureImage

This article shows how to capture contact images using a Dynamics 365 mobile App based on the new client API in version 9. The same could be extended to capture images in any entity for other business scenarios.

The new Dynamics 365 API introduces several new namespaces, one of them is Xrm.Device. This namespace offers the method Xrm.Device.captureImage that we will use here to take the photo of our contact.

Firstly, we will create a Dynamics 365 App:

rtb_blog_apps menu

You can also get into the “My Apps” section using the following URL:


Please notice we will use the new Unified Interface in the Client option:


This app will be available for the Dynamics 365 for phones.¬†In my case, I’m testing it with an iPhone.

In the new app, we will edit the site map to include the contact entity:


Now we will add a new button to the contact form ribbon. There are different ways to do this, in my case I have used the Ribbon Workbench editor within XrmToolbox:


We will pass the record GUID and the entity type (e.g. contact) as the command parameters:

rtb_blog_ribbon_form_command parameters

The button will trigger the corresponding command (e.g. GetPhotoCommand) and this will execute the JavaScript function to capture the image (e.g. GetPhoto). This code should be placed in a WebResource.

rtb_blog_unifiedinterfaceapp_captureImage code

You can download this code from GitHub:


Once we have captured the image, we will update the current contact record. There is where we are using the method Xrm.Web.updateRecord. To display some alerts or potential error messages, we will use the method Xrm.Navigation.openAlertDialog and Xrm.Navigation.openErrorDialog. Finally, to refresh the form and show the new picture, we are refreshing the form with the method Xrm.Navigation.openForm. These methods are also part of the new client API with Dynamics 365 version 9.

In the actual mobile app, you should see something like these screens:


The new button should appear when you click on “…”:


Once you click the button, it should trigger the device camera:


If everything is ok, it will show us the alert dialog we were expecting:


Finally, the picture should appear in our contact form:


Notes: This article has been written using the platform version

Dynamics Outlook App button doesn’t appear

This article describes how to fix an issue with the new Dynamics 365 App for Outlook. In this scenario, the Dynamics App button was available in the Outlook web client (OWA – https://outlook.office365.com), but it didn’t appear in the Outlook 2013 installed in the desktop.

As the app was working fine in the OWA client, we understood the administration configuration was done properly from the Dynamics side (e.g. security role, user mailbox). So we had to run some test in the corresponding machine to learn more about the problem.

In order to carry out those tests, we used the utility Microsoft Office Configuration Analyzer Tool 2.2 (known was OffCat). It provides a quick and easy way to analyze Microsoft Office programs for known configurations that cause problems, including in Outlook. You can download this utility from the following link:


Once you install it, you will get the following menu to choose the program to be scanned, Outlook in our case:

After running the scan, OffCat will highlight potential issues and it will also suggest options to fix it straight away, very useful.

Finally we were able to resolve the issue just installing the latest update for Outlook 2013:


Hope it helps!


Using “EWS Editor” to fix “Dynamics 365 App for Outlook” issues

This article describes how to use the EWS Editor for Dynamics 365 utility to resolve Dynamics 365 App for Outlook issues. This post is a continuation of my previous article where I listed several checks to fix deployment issues with the Dynamics Outlook App.

EWS Editor was originally created to demonstrate the capabilities of the Exchange Web Services API. EWS Editor for Dynamics 365 is based on that one to provide additional utilities and troubleshoot issues related to Server-Side Synchronization and the E-mail Router.

Because the Dynamics 365 App for Outlook relies on the Server-Side Synchronization, this utility becomes also useful to resolve issues with the Dynamics Outlook App. In our case, we were getting the following error:


This happened to us when we enabled the Dynamics Outlook App in a different organisation. So the app for this user was first enabled in organisation A, then we needed to deactivate it in this org and add it in organisation B, but we started to get that error and we couldn’t deploy it in org B and it also stopped working in org A ūüė¶ .

The following steps describe how we use this tool to finally fix the problem:

Step 1 РDownload EWS Editor for Dynamics 365

Step 2 – Launch ‚ÄúEWSEditorForDynamics365.exe‚ÄĚ

Step 3 – Connect to Exchange Service

ramontebar_blog_EWSEditor_Exchange Connection

ramontebar_blog_EWSEditor_Exchange Connection Authentication.png

Step 4 – Add Mailbox Root

ramontebar_blog_EWSEditor_Mailbox root dialog

ramontebar_blog_EWSEditor_Mailbox root folders

Step 5 – Connect to Dynamics 365 Service

ramontebar_blog_EWSEditor_Connect to Dynamics 365 Service

Step 6 – Open All Items

Expand MsgFolderRoot and select Allitems by double clicking it.

Step 7 –¬†Show To-Be Tracked Items

Navigate to View => Filter View Items => Show To-Be Tracked Items

ramontebar_blog_EWSEditor_Show To-Be Track Items

Step 8 – Check that crmLinkState is set to 1

Exchange Items (email, tasks, contacts, appointments) that have been tracked in Dynamics will have some additional properties to define the link between the systems. One of those properties is crmLinkState, which should have one of these values:

0 – Item is not tracked

1 – Item To-Be tracked

2 – Item has been tracked


Step 9 РHard Delete* all items to be tracked (pending tracking) where crmLinkState is 1

Right click on each item and navigate to Delete Item => Hard Delete

ramontebar_blog_EWSEditor_Hard Delete.png

*Please notice you may lose important information, so make sure you are ok deleting those emails or other items.

Step 10 (END!) – Enable the Mailbox again

  1. Now navigate to your Dynamics instance.
  2. Open the User mailbox and click on ‚ÄúTest and Enable Mailbox‚ÄĚ.
  3. Check the Box ‚ÄúSync items with exchange‚ÄĚ
  4. Wait till you receive the “Success” message for both emails and appointments.
  5. Once you receive the Success message, deploy/add the app again.
  6. This should resolve the issue.

If you want to learn more about the EWS Editor, check the following URL:


**Credits: Thanks to my colleague Narendra for helping me to put this content together.

Fixing Dynamics Outlook App deployment issues

This article describes several options to resolve issues when deploying the new Dynamics 365 Outlook App but the user cannot see the Dynamics add-in in his/her Outlook.

ramontebar_blog_Dynamics Outlook App Button

One of the most challenging errors that we have found so far was this one:


See below more details regarding the same, but before that, I’ll first cover the simple checks you can do and then move into the most complex one. Please try to follow the same order.

Check 1: Deployment Status

Our stating point is the Dynamics 365 App for Outlook administration section within Settings. You have probably already added the App from there. Check now the Status, that will give you some useful information:

ramontebar_blog_Add Dynamics 365 App for Outlook in Settings - Deployment Status

If the Status is Pending, remember it may take up to 15 minutes to be deployed.

If there was a deployment issue, you would get a red message with some error information.

Re-add the app for the failing user, that should fix the issue. Otherwise, carry on with the next check.

Check 2: Basic configuration

The first thing you may have already looked at is this Microsoft Dynamics 365 App for Outlook Deployment guide¬†. I won’t repeat what is in there, but basically you want to review these points carefully again:

  • Does the user got the right Security Role and required privileges?
  • Has the user mailbox been configured correctly?
    • Server-Side Synchronization should be enabled (Outgoing Email not required)
  • Has the user mailbox “Test & Enable” successfully? You should see the “Success” status as below.

ramontebar_blog_User Mailbox

Even if you think you have already done those correctly, review and run them again, sometimes it will just work.

Check 3: User Mailbox Alerts

The new Dynamics Outlook App relies on Server-Side Sync (SSS) to track the corresponding records. This is the reason why the Mailbox Alerts become very important and many times the error messages in there may give you the clue to fix the problem.

ramontebar_blog_Dynamics User Mailbox Alerts

Click on “Test & Enable Mailbox” again and confirm you are getting the same Mailbox Alerts. Otherwise, it may actually sort out the issue.

Check 4: Manage Outlook Add-ins

In your Outlook desktop application, you will find a Manage Add-ins when you click on File in the main menu:

ramontebar_blog_Manage Outlook Add-ins

This “Manage Add-ins” button will take you to the following URL which allows you to manage the Web Add-ins for Outlook:


In there you will be able to confirm what is the Dynamics organisation where the Outlook App is pointing to and its version number. Make sure it is what you were expecting and it is not pointing to a different environment.

In this portal, you can also Uninstall the Dynamics App using the “-” button, see the following screenshot:

ramontebar_blog_Manage Web Outlook Add-ins

Try to uninstall the app and then add it again as we saw in the Check 1.

Check 5: Delete all emails from draft and deleted folder

  1. Close all open emails in Outlook.
  2. Delete all Draft emails by navigating to draft folder.
  3. Delete all emails from Deleted items folder.
  4. Now navigate to your Dynamics instance.
  5. Open the User mailbox and click on ‚ÄúTest and Enable Mailbox‚ÄĚ.
  6. Check the Box ‚ÄúSync items with exchange‚ÄĚ
  7. Wait till you receive the “Success” message for both emails and appointments (if you enabled both).
  8.  Once you receive the Success message, deploy/add the App again for the corresponding user.
  9. This should resolve the issue.

Check 6: “Approve Email” by Global 365 Administrator

Initially, this “Approve Email” is only required for sending emails out, which is not a requisite for enabling the Dynamics Outlook App. However, we have noticed this can also help in some cases. Please follow these steps:

  1. Open the User mailbox.
  2. Check if the below message is displayed on the mailbox: ‚ÄúEmail won’t be processed for this mailbox until the email address of the mailbox is approved by an Office 365 administrator…‚ÄĚ
  3. If yes, Ask Office 365 Administrator to Approve the email processing by clicking on ‚ÄúApprove email‚ÄĚ button.
  4. Once this is approved by office 365 Administrator then Open the User mailbox and click on ‚ÄúTest and Enable Mailbox‚ÄĚ.
  5. Check the box ‚ÄúSync items with exchange‚ÄĚ
  6. Wait till you receive the “Success” message for both emails and appointments.
  7.  Once you receive the Success message, deploy/add the app again.
  8. This should resolve the issue.

Check 7: Accept conflicts from Mailbox

  1. Go back to the User mailbox and navigate to Alerts.
  2. Delete all alerts by clicking on Delete button.
  3. Check if there are any Scheduling conflicts exists.
  4. If Yes, accept them (click Yes) one by one.
  5. Now click on ‚ÄúTest and Enable Mailbox‚ÄĚ.
  6. Check the Box ‚ÄúSync items with exchange‚ÄĚ
  7. Wait till you receive the “Success” message for both emails and appointments.
  8.  Once you receive the Success message, deploy/add the app again.
  9. This should resolve the issue.

ramontebar_blog_Dynamics Outlook App_Mailbox Alert_Scheduling conflict

Check 8: Use “EWS Editor For Dynamics 365” tool

This utility allows you to retrieve Microsoft Exchange emails and inspect their Dynamics 365 properties (e.g. crmid, crmLinkState) for those emails that have been tracked.

You can find this utility here:


This utility was the one that helped us to resolve the issue ExchangeError:UnknownIncomingEmailIntegrationError.

Since you should be already bored of reading this article ūüôā , I’ll give you a break and I’ll show you more things about this tool in my next post that I’ll publish very soon.

**Credits: Thanks to my colleague Narendra for helping me to put this content together.

Resco Mobile Certificate Pinning validation

This article describes a new security feature now available in the Resco Mobile solution that allows certificates validation. This is an important consideration when you are dealing with mobile devices.

During the last months, we have been working with the Resco.net solution integrated with Dynamics 365 and it has been a great experience. It is definitely a very competitive alternative if you are considering a mobile solution for your business and CRM implementation.


This new Certificate Pinning validation feature has been introduced in the version 10.2.1. 

Basically it allows the mobile client to confirm if the service that is connecting to (e.g. Dynamics 365) is the expected one.

Normally, once you configure the Resco App with the corresponding Dynamics 365 URL, you would expect that everything would be ok and the connection would be safe based on the TLS protocol:

ramontebar_blog_TLS Certificate

However, in a hostile environment where the network may not be reliable, a malicious party could take advantage of it and intercept this connection, providing a fraudulent certificate:

ramontebar_blog_Malicious TLS Certificate

To avoid this risk, Resco has implemented a certificate pinning validation based on their current solution:

ramontebar_blog_Resco Certificate Pinning solution

Within Woodford, an administrator will now be able to configure the expected certificate(s) thumbprints:

ramontebar_blog_Resco Woodford Certificate settings

The Certificate Thumbprint can be found easily using, for example, Internet Explorer:

ramontebar_blog_Dynamics 365 Certificate root

ramontebar_blog_Dynamics 365 Certificate Thumbprint

In this example, the Mobile Resco App would have downloaded the corresponding Woodford Project with the Thumbprint “62 7C 0A 58 A2 64 76 77 1D 55 74 10 35 56 F8 79 54 33 F6 05”. When the app connects to the service, it compares that value with the one in the actual certificate. If they were the same, it would carry on; otherwise, the user would get the following error:

ramontebar_blog_Resco Mobile App Certificate error

You can find more details about the Certificate Pinning technique in the Open Web Application Security Project (OWASP). 

**Images Credits: Icons made by Freepik and Smashicons from https://www.flaticon.com

Dynamics 365 Outlook App button inactive

This article shows a scenario where the Dynamics 365 app button will be inactive, like grayed out, in the Outlook menu. This may be caused just because of the View Reading Pane configuration in your Outlook client.

ramontebar_blog_Dynamics Outlook App - Grayed out button

However, you may still see the button active when you create a new email or an appointment:

ramontebar_blog_Dynamics Outlook App - Appointment Active button

ramontebar_blog_Dynamics Outlook App - Email Active button

In Outlook, your View Reading Pane must be Right or Bottom for the button being active:

ramontebar_blog_Dynamics Outlook App - Reading Pane Right or Bottom

ramontebar_blog_Dynamics Outlook App - Reading Pane Off

Hope this helps.

Configurations notes:

This post is based on the following configuration:

  • Dynamics 365 Online Version:
  • Outlook 2013

Please notice there may be other reasons why this button could be inactive, see the following forum discussion.



Simulate long operations in Dynamics 365 (CRM)

This article describes how to simulate a long operation in Dynamics 365 (CRM) using a simple custom plugin that introduces a delay using the Thread.Sleep function.

Background: recently we have been investigating an issue regarding some timeouts happening in a third party application which connects to our Dynamics 365 service. At the moment, it is difficult to tell if those timeouts are due to some slow connections to Dynamics or other reasons. In order to help us with this investigation, we are going to set the Timeout property of the OrganizationServiceProxy in the client application, which by default is 2 minutes.

Before applying this change, we also want to test it and¬†simulate some long queries that would last longer than the client timeout limit set for the¬†OrganizationServiceProxy. Here is where we have created this simple plugin “DelayOperation” that is going to introduce a delay for a certain number of seconds.

ramontebar_blog_Delay Operation Plugin_Sequence Diagram

For testing purpose, I have prepared a simple test that creates a Task record. See below the corresponding code:

ramontebar_blog_Create Task Test - Set OrganizationServiceProxy Timeout

Then we have registered our “DelayOperation” plugin in the create message of the Task entity, see below this plugin registration step:

ramontebar_blog_DelayOperationPlugin_Assembly Registration

ramontebar_blog_Delay Operation Plugin_Step Registration

Notice we pass the number of milliseconds to be used by the Thread.Sleep function as an unsafe plugin parameter. In our example, the client would wait for 10 seconds and the plugin would delay the operation for 12 seconds, causing the client to timeout.

Finally, our “DelayOperation” plugin code is:


You can download all this code from the following Github project:


 I hope you find it useful!

Dynamics 365 v9.0 is already available

Some great news this week, the new Dynamics 365 (CRM) version 9.0 is already available for trial.

The build version I’ve got with my UK trial ([orgname].crm11.dynamics.com) is¬†

ramontebar_blog_Dynamics 365 v9.0

You can now enjoy some of the new features that I show below:

  • New design:

ramontebar_blog_Dyn365 v9.0 Main Dashboard

ramontebar_blog_Dyn365 v9.0 New Form design

  • New Unified Interface Apps

ramontebar_blog_Dyn365 v9.0 Apps Unified Interface

ramontebar_blog_Dyn365 v9.0 App with New Unified Interface

ramontebar_blog_Dyn365 v9.0 New Unified Interface

  • Flow Integration

ramontebar_blog_Dyn365 v9.0 Flow integration

  • Multi Select Option Set attributeramontebar_blog_Dyn365 v9.0 MultiSelect Option Set
  • New Solutions Components, including Virtual Entities:ramontebar_blog_Dyn365 v9.0 Solution Components

You can find more information about the new features in these Microsoft articles:


Changes for developers:


Enjoy your trial!