Blog Archives

Dynamics 365 (CRM) Image Loader

This article describes how to create a simple Dynamics 365 (CRM) web resource that would allow us to display images based on a dynamics URL. This URL would be stored in an entity attribute and the name of the attribute would passed as a parameter to the web resource.

Preparing the demo for EMEA Summit 2017, I needed to display some logos and organisations images (covers) in the Account entity.

Let me show you a picture and you will immediately get what I mean:


In our demo, we used the account entity to track the different NGOs / charities that would be part of the end solution. Each charity would have their own different logo and image cover that would be, later on, displayed in the PowerApp we also prepared.

Those images would be defined based on the following account attributes:


Solution: A simple web resource that would allow us to specify the attribute name with the URL as a parameter.

Below you can see the form definition, which got 2 web resources to host those previous images:


If we now look at the properties of each web resource, we would see they are using the same HTML web resource behind the scene, but the parameter we are passing is different. The parameter is actually the attribute name to feed the image:


And the other one:


If you want to see the code of that HTML web resource, have a look at my GitHub link.

Hope you find it useful 🙂

Too many active business process flows

Have you seen that message before on your Microsoft Dynamics CRM organisation?

Too Many Active Business Process Flows Error

You may have if you have tried to activate more than 10 business processes at the same time for the same entity.

List Of BPF On The Case Entity

This is a limitation by design which is well-known and described on the Microsoft technical documentation, have a look at the following article.

This limitation can be changed using the organisation property Organization.MaximumActiveBusinessProcessFlowsAllowedPerEntity. The easiest way to to change this attribute is using the following tool: Dynamics CRM Organization Settings Editor (OrgDBOrgSettings)

CRM Org Settings Editor

And now, you may be thinking: “why on earth would you do that??”

If your CRM deployment is heavily used, some core entities (e.g. Case, Opportunity) may be used intensively on different processes across an organisation.

Note: the current CRM version I’m using is: ( (DB

[CRM] Voice of the Customer available in EMEA

You can already try the new Voice of the Customer (VoC) functionality in Dynamics CRM Online (only Online for now). Initially it was only available in US deployments ( but this week has been released in EMEA datacenters as well (

Voice of the customer Office365 crm4

VoC allows you to design and publish surveys using Dynamics CRM. You can then share these surveys with your customers and gather their feedback efficiently within CRM.

Voice of the customer CRM Main Menu

The current CRM version I’m looking at is

And the solution package is 8.1.344.1:

Voice of the customer CRM Solution 8.1.344.1

You can find more documentation in the next link:


Role to JUST Import Data into Dynamics CRM

If you need to give the ability for a Dynamics CRM user to Import Data, you can just create a security role with access to the next entities:

  • Data Import
  • Data Map
  • Import Source File

Note: I have notice you will need, at least, Delete right – user level on the Data Import entity (it doesn’t make sense if you just want to allow the import, but this is what I found; it could be a bug). Otherwise the IMPORT DATA button won’t appear. See the same in the next screenshot:


See below an screenshot with the configuration described above.


Have you seen the latest CRM Developer Center? It is a great place for developers getting started with Dynamics CRM. The search has been customised and improved to find content only related to CRM, see below an example.

In the same site, have a look at the Documentation section, which contains useful things like the new Preview WEP API coming soonDynamics Marketing and Unified Service Desk.

Also there are many resources for those interested on Mobile development, have a look at Mobile SDK.



Notice how “entity” brings results only relevant about Dynamics CRM (e.g. rather than Entity Framework)




Dynamics CRM + Microsoft Edge

I’m enjoying the new Windows 10. One of its new features is Microsoft Edge, the replacement for Internet Explorer. It is definitely quicker and cleaner.

My Edge favourite feature so far is “Make a Web Note“. It allows you to write notes on the current page you are browsing, highlight things and add typed notes to describe steps.

I find this browser utility very useful for Dynamics CRM users who needs to share tricks or help other colleagues. See below an example.

A colleague doesn’t know how to find Leads, so we are going to get him an screenshot highlighting where to go within Dynamics CRM:



On the right top corner, select “Make a Web Note” icon:



RTB_BLOG_Edge_Make a note


A new noting bar will open with the utilities at the left corner. See how the Lead tile has been highlighted:



Then you can Share the same using different options, either taking an screenshot or sending it to other apps, like OneNote:

RTB_BLOG_Edge_Share or Save



Dynamics CRM 2015 SDK and Developer Toolkit

The new CRM SDK  2015 doesn’t give support yet for our known CRM Developer Toolkit,  which has been part of the CRM SDK until CRM 2013. Basically, the CRM SDK 2015 assemblies have been compiled with .NET Framework 4.5.2, but CRM Developer Toolkit was compiled using NET Framework 4.5. See the next Microsoft article for more details.

For instance, let’s check the new assembly Microsoft.xrm.sdk.dll part of the CRM SDK 2015: 



The good news are… we still can make compatible the Developer Toolkit with the latest CRM SDK 2015 editing the .NET Framework in the corresponding projects of our Visual Studio solution. Let’s say we have the next CRM solution:



For plugins and workflows, we should update the references to the new assemblies and also the .NET Framework in the project properties:


After updating those references, we could still find the following error:

“The type or namespace name ‘Xrm’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)”

This error is indicating you haven’t got installed the expected .NET Framework 4.5.2. Do right click on the same project and select Properties to check the version actually used:


If you are only getting old versions of the Target Framework, select “Install other frameworks…” that will take you to the next site:

There you must download .NET Framework 4.5.2 Developer Pack.

After it has been installed, you get a new option in that previous list:


Finally, we need to do something similar with the CRM Package Project. But in this case, we will have to edit the project file and update the entry “TargetFrameworkVersion” to “4.5.2”. Start unloading the project:


Update the mentioned entry “TargetFrameworkVersion“:


Finally, reload the project again and everything should work now!


About this last part, I would like to say thanks to my CRM MVP colleague Scott Durow (@ScottDurow), who helped me to find that entry.

If you don’t update the package project, it may still compiled, but the actual deployment will fail and you should see the next warning in the Visual Studio output:

warning MSB3274: The primary reference “[Your Assembly Name].dll” could not be resolved because it was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”

warning MSB3275: The primary reference “[Your Assembly Name].dll” could not be resolved because it has an indirect dependency on the assembly “Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35” which was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”

[Dynamics CRM] Find processes by content

Using any version of Dynamics CRM, have you ever tried to find all processes that contain

  •  A certain Step in some Business Process Flow
  • A Custom Workflow Activity that you have developed and you try to reuse in several Workflows
  • A Dialog that contains some particular question
  • An Action with an specific parameter

If so, probably you noticed that Advanced Find (an out-of-the-box CRM tool to create custom queries) is not enough.

Let’s just understand the anatomy of the processes. CRM uses internally Windows Workflow Foundation as its workflow engine, so that CRM processes are defined using XAML. So, when you create a process using the CRM UI designer, the platform translates it to XAML.

So, then, we are looking for those processes which XAML contains some text. Looking at the metadata of the Process entity, we can see there is an attribute called XAML:

DXTools Metadata Browser - Process XAMLNote: You can find this Metadata Browser in CodePlex, see You can also use the CRM SDK Metadata Browser

Now the question: how do we interrogate this XAML attribute? Solution: CRM OData query

CRM exposes an OData service which can be easily consumed by external applications or even using the browser. See more information in CRM SDK. Because this service allows to access more attributes than the Advanced Find tool, we can use the next query to find the processes whose XAML contains a certain string:

https://[OrganisationName].crm[x]$filter=substringof(‘[String]‘,Xaml) and Type/Value eq 1

The parts marked with brackets should be replaced with your corresponding context. The last condition is just filtering the Type of process, returning only those which are the actual Definition (Value: 1).

You can also build easily this query using the tool OData Query Designer in CodePlex, see

Let’s try it now! Out of the box there is a Business Process Flow called “Lead to Opportunity Sales Process”, which contain an step with name “Existing Contact?”:

RTBlog - XAML Process - LeadToOpportunityFlow

RTBlog - XAML Process - LeadToOpportunityFlowDefinition

Let’s say we want to find any process that contains that step “Existing Contact”, so we will use the next query:$filter=substringof(‘Existing Contact‘,Xaml) and Type/Value eq 1

Just putting that query in IE, we will see the next results:RTBlog - XAML Process - ODataQueryResultsSample1

Another example. Let’s say you are using N52 Formula Manager and you want to find all processes that are using a particular Formula Genie. In our example, this formula is going to generate a Hashcode for a given contact based on its fullname. This hashcode can be used for de-duplication:

RTBlog - XAML Process - N52FormulaGenie

Now, I want to find all the processes that are using this formula at least in one of their steps. So I will use the next OData query:$filter=substringof(‘uzX,Xaml) and Type/Value eq 1

Where “uzX” is the formula short code.

Putting that query on IE, I will get the next results:

RTBlog - XAML Process - ODataQueryResultsSample2

New Customer” is a custom process that I created to use that formula and generate a hashcode every time a new contact is created or its full name gets updated:

RTBlog - XAML Process - NewCustomerWorkflow

See below a contact sample with a hashcode (below full name attribute), which has been generated by the above process:

RTBlog - XAML Process - ContactHashcodeSample



Microsoft publishes CRM SDK in NuGet (Visual Studio)

CRM SDK is now also available from the Visual Studio extension NuGet. This extension is a provider of third party packages where anyone can participate and publish their own ones. This makes very easy to add third party assembly references.

  • Install NuGet in Visual Studio from “Tools => Extensions and Updates”

  • Once NuGet is installed, create a Visual Studio Project (a library for example) and make right click on the Visual Studio project where the CRM SDK assemblies will be used. Select “Manage NuGet Packages…”

  • Choose the Online option on the left menu and search for “crmsdk“. A list with all the CRM SDK assemblies published by Microsoft will be presented. Choose the corresponding assembly based on its version.

In this case, I have installed the CRM 2013 assemblies:

  • Notice the new package and reference configuration linked to the project:
    • packages.config” file in the project where the NuGet packages have been installed

    • New folder with the assemblies in the root solution folder. You can find the assembly file within the package folder. In this case, the new CRM 2013 SDK package contains two assemblies, see below:

    • New library reference have been added automatically to the chosen project: