Blog Archives

Dynamics attributes utilisation by FetchXML

XrmToolbox is an amazing free utility formed by many tools that have been developed by the community. During the last weeks, I have been particularly using and enhancing the Attribute Usage Inspector. This tool tells you the fields utilisation in your Dynamics 365 Customer Engagement (CRM) environment.

Figure 1 – Opportunity attributes utilisation for all records

In this article, I’ll show how I have extended this utility to allow FetchXML queries which defines the scope of the attributes to be analysed.

Visualising what attributes are used and what aren’t can be extremely helpful in your project analysis to understand adoption and drive new features.

In the above Figure – 1, you can see the attributes utilisation for the opportunity entity. In this case, the tool is using all the records and attributes in the system. You could also filter these attributes or even use a SQL query:

Figure 2 – Attribute Usage Inspector Settings. New FetchXML query option.

Additionally, I have recently added a new option to allow a FetchXML query (see “Use FetchXML query” in above Figure 2), which will define what attributes and records will be analysed  based on the results of the same query. 

Once you have selected the new setting “Use FetchXML query“, you will find a new dialog after you click on an entity:

Figure 3 – FetchXML Query dialog

The new FetchXML Query dialog allows basically 3 things:

  1. Generate the FetchXML query using a System View.
  2. Generate the FetchXML query using a User View.
  3. Use your own FetXML query just editing or pasting the text in the editor.

The FetchXML Query dialog also validates the query in run time to avoid potential mistakes. 

For instance, let’s say we want to understand certain opportunity attributes utilisation for those records created in the last months. Using the XrmToolbox FetchXmlBuilder, I have generated my own FetchXML:


Figure 4 – FetchXML Builder tool to generate custom FetchXML

I will then paste the same query in the FetchXML Query dialog shown in Figure 3:

Figure 5 – Attribute Usage Inspector using a custom FetchXML query

After clicking OK, the tool will use the same custom query to provide the corresponding results:


Figure 6 – Attribute Usage Inspector results with a custom FetchXML query

Notice how only a subset of the attributes are presented in the results and the number of records and % utilisation are determined by the FetchXML query.

How do I get this tool?

After you have downloaded the main XrmToolbox utility from https://www.xrmtoolbox.com, go to its Plugins Store and search for “Attribute Usage”, then install the Attribute Usage Inspector plugin:


Figure 7 – Install Attribute Usage Inspector from XrmToolBox Plugins Store

In case you were already using it, notice there is a new version 1.2018.9.11, which contains the new FetchXML query feature.

Where is the code?

The whole tool is open source and you can find the code here:

https://github.com/MscrmTools/MscrmTools.AttributeUsageInspector

https://github.com/rtebar/MscrmTools.AttributeUsageInspector

The Dynamics Community

You can reach and participate in the Dynamics 365 Community using the following channels:

Sites:

Dynamics in general

https://community.dynamics.com/

https://experience.dynamics.com/

PowerApps

https://community.powerapps.com

Flow

https://community.flow.microsoft.com

Power BI

https://community.powerbi.com/

Twitter:

#msdyn365community

 

 

 

 

Business Applications MVP 2018-2019

Last week I received at home a small ring that came all the way from US. It was a small gift from Microsoft to celebrate another year as part of the MVP community 🙂

rtb_blog_Business Applications MVP award 2018-2019

Since 2012, I have really enjoyed being part of this technical community where I have met very good professionals from all around the world.

Microsoft created this program more than 20 years ago to recognise individuals who help others to learn and understand Microsoft’s techonologies. Today we are more than 4,000 MVPs globally.

This award is split in different categories and areas depending on the technologies that we contribute to. Microsoft’s priorities and focus have evolved consideriable during the last years, which has also been reflected in the MVP award structure. My first year I got nominated as “CRM MVP“, then “Business Solutions MVP” and this year it was “Business Applications MVP“. Below you can see the current MVP award structure:

rtb_blog_MVP Award Categories 2018-2019rtb_blog_MVP Award Categories_2 2018-2019

If you would like to learn more about the Microsoft MVP Program, have a look at this site:

https://mvp.microsoft.com

Dynamics 365 October 2018 Release

In October 2018 there will be another big release for Dynamics 365, including Marketing,  Sales, Service, Social Engagement, Finance and Operations, Talent, Retail, Business Central (Nav), PowerApps, Microsoft Flows and Power BI (Business Intelligence), Data Integration and Mixed Reality business apps.

These were the news published just yesterday at the Microsoft Business Applications Summit 2018 celebrated in Seattle.

The release notes (Download the October ’18 Release Notes PDF) include more than 100 changes across all those technologies, so get a coffee and start reading 🙂

If there was a particular area that I had to highlight, that would probably be PowerApps and Microsoft Flow. See below my favorite features.

PowerApps

Dynamics 365 entity forms with embedded canvas apps

PowerApps within PowerApps! That’s basically it. So we will have the ability to put the powerful and flexible Canvas apps within our Model-Driven apps, like custom controls.

Canvas apps with Solutions

To improve our ALM process, we will be able to pack our Canvas apps within Solutions, allowing us to deploy them easily between environments (e.g. dev=>test=>…=>prod).

ramontebar_blog_d365Oct2018Release_Solution Checker_List

Solution Checker

This utility within the platform will help us to identify potential design and performance issues in our apps.

ramontebar_blog_d365Oct2018Release_Solution Checker_Dashboard

Microsoft Flow

Custom controls in Business Process Flows

Previously, business process flows only permitted the available XRM attribute types (such as text, optionset, lookup, number, and so on) to be surfaced as control steps inside business process flow stages. Now, custom controls, which offer rich interaction mechanisms both in Unified Interface and the Web Client, are supported. They power
controls such as sliders, radial knobs, timelines, and even the LinkedIn controls.

ramontebar_blog_d365Oct2018Release_BPF Custom Controls

Flow management connector, SDK, and APIs

Microsoft Flow is becoming the core processing solution in the Dynamics ecosystem. More documentation will be provided around its SDK and APIs to improve deployments, automation and governance.

Location as a connector

The feature allows users to create a location range that will trigger a flow when a mobile device enters or leaves it. Cool, isn’t it?!

Flows in Visio

We will be able to design our flows in Microsoft Visio, so you won’t have a excuse for “no documentation” now 🙂

ramontebar_blog_d365Oct2018Release_Flows in Visio

Are you ready for the Dynamics 365 / CRM Quiz at Summit EMEA 2018?

The Summit EMEA 2018 conference in Dublin is almost there and we have been preparing some tough, fun and educational questions for those who like a challenge.

The Quiz will be focus, mainly from a technical perspective, on Dynamics 365 Customer Engagement, CRM and other related technologies like Azure.

The whole Quiz will be an interactive session where you will be able to provide your answers from your mobile device and see the results in real time. We will take one question at the time, share the results in the main screen and discuss the different answers.

Our purpose is to create an entertaining contest where everyone can learn something.

But that is not all! For those who win the Quiz, there will some great awards, don’t miss it 🙂

You can join the event and add this session to your list following this link:

https://www.summitemea.com/conference-schedule/crmugsessions

See you in Dublin!

Session Title: DEV02 – Dynamics 365 CE Quiz! Who Will Be the Winner?

When: Thursday, April 26. 10:30 – 12:00

Where: Wicklow Meeting Room 3

SummitEMEA 2018_Dublin_Dynamics365_CE_QUIZ_Wael_Ramon

Slides Dynamics 365 Saturday London

What a great event we enjoyed last Saturday! 🙂

As I mentioned in my previous post, the Dynamics 365 Saturday event took part in London in the Microsoft Paddington offices. It was a great experience to see so many participants (150+) in such a collaborative environment.

You can now find below the slides for the presentation that my MVP colleague Baris and I used during our session, which covered the new features and deprecations coming with the version 9 for Dynamics 365 Customer Engagement.

Finally, I would like to share this great picture that was taken on Saturday morning just to kick off the event with James Phillips, great memory 🙂

DUitCzFW4AEuhrS

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:

https://orgname.crm.dynamics.com/apps

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

rtb_blog_unifiedinterfaceapp_captureimage

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:

rtb_blog_unifiedinterfaceapp_sitemap_contact

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:

rtb_blog_ribbon_form_new_photo_button

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:

https://github.com/rtebar/Dynamics-Utils/blob/master/Dynamics.Utils/Dynamics.Utils.Web/CaptureImage.js

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:

20180122_114627000_iOS

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

20180122_114643000_iOS

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

20180122_114700000_iOS

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

20180122_114708000_iOS

Finally, the picture should appear in our contact form:

20180122_114809000_iOS

Notes: This article has been written using the platform version 9.0.0.3267

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:

https://www.microsoft.com/en-us/download/details.aspx?id=36852

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:

https://support.microsoft.com/en-gb/help/4011282/december-5-2017-update-for-outlook-2013-kb4011282

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:

ExchangeError:UnknownIncomingEmailIntegrationError

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

ramontebar_blog_EWSEditor_crmLinkState

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:

https://blogs.msdn.microsoft.com/mstehle/tag/EWSEditor/

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