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:
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:
To avoid this risk, Resco has implemented a certificate pinning validation based on their current solution:
Within Woodford, an administrator will now be able to configure the expected certificate(s) thumbprints:
The Certificate Thumbprint can be found easily using, for example, Internet Explorer:
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:
You can find more details about the Certificate Pinning technique in the Open Web Application Security Project (OWASP).
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.
For testing purpose, I have prepared a simple test that creates a Task record. See below the corresponding code:
Then we have registered our “DelayOperation” plugin in the create message of the Task entity, see below this plugin registration step:
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!
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 188.8.131.52.03.
You can now enjoy some of the new features that I show below:
- New design:
- New Unified Interface Apps
- Flow Integration
- Multi Select Option Set attribute
- New Solutions Components, including Virtual Entities:
You can find more information about the new features in these Microsoft articles:
Changes for developers:
Enjoy your trial!
Few years ago, I started a project in Codeplex called “Dynamics CRM Custom Emails“, which allows you to send emails from a Microsoft Dynamics 365 / CRM process (e.g. workflow, action) based on an Email Template. Additionally, these emails can contain dynamic values for any entity (out-of-the-box or custom) and any type of attribute (e.g. lookup, option set, currency, etc).
Apart from just migrating the project from one place to the other, I have also updated it to the latest Dynamics 365 version.
There are some open issues in Codeplex that I would like to review, so I will try to do it before Codeplex closes and reflect them in the new Github project. I would like to thank you those guys who have collaborated and provide their feedback.
For those who has never seen this project, I would like to show you a quick example with some screenshots.
Let’s say we had the following Email Template:
We could then produce an email like this:
These would be done by a Dynamics workflow like this one:
This workflow will use the custom workflow activity provided by this solution. You can then specify the corresponding context parameters:
You will find more documentation in the Github project site:
This year I’ll be presenting at the CRMUG Summit EMEA 2017 celebrated in Amsterdam. The idea started last year when I was speaking with my Microsoft AX MVP colleague Antonio @_Gilabert_ at the MVP Summit.
With Dynamics 365, CRM and AX are closer than ever, so we thought that it would be great to have a presentation together and share our experience and view with the community.
We would like to do a functional and practical session where we will show how both platforms can be integrated, in the new Dynamics 365 world, to deliver a real business scenario. Our challenge is to use the new Microsoft Flow and Common Data Service for the integration. At the moment, they are still very new and many capabilities are very limited.
Although we are still working in the demo, we are also preparing a PowerApp to improve the user experience and present how they can be useful alongside Dynamics 365 for Sales and Operations.
I would also like to say thank you to Hugo de Jesús, who is helping us a lot to prepare the presentation.
You can find more information about the schedule in this link.
We hope you enjoy the event, and of course, our session! 🙂
Creating scheduled workflows has always been a challenge in Dynamics
CRM 365. The community and ISVs have offered several original options, but there is not yet an official out-of-the-box option. This article brings another alternative to the table using Microsoft Flows.
A scheduled workflow is the one that runs at a certain arranged time and it may recur to run again after a period of time. If you want to understand more about this challenge and how our CRM community has resolved it so far, have a look at the following articles:
Microsoft Flow offers the option to create Recurrence jobs. This can be used to schedule and trigger actions in Dynamics 365, like retrieve, create or update records (see available actions). So, using this functionality you already have a good alternative to create your own scheduled workflows without development effort. You can see some examples in the following article as well as in these Dynamics 365 Flow templates.
The other alternative would be a mix solution where a recurrence Microsoft flow creates a custom Dynamics 365 “Scheduled Job” record and this triggers the corresponding Dynamics 365 workflow. The “Scheduled Job” entity would have attributes like “Process Name”, “Run as” (e.g. system user name), “Query scope” (e.g. FetchXML or view name), …, to specify what and how to run the workflow. This option would require additional development, either a plugin or a custom workflow activity to call on demand the given process, but it would also allow you to reuse the logic and capabilities you already have within Dynamics 365.
Hope you find this article useful. Looking forward to hearing your feedback.
Have you seen that message before on your Microsoft Dynamics CRM organisation?
You may have if you have tried to activate more than 10 business processes at the same time for the same 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)
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: (184.108.40.2069) (DB 220.127.116.119)
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:
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].dynamics.com/xrmservices/2011/OrganizationData.svc/WorkflowSet?$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 http://dynamicsxrmtools.codeplex.com/.
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?”:
Let’s say we want to find any process that contains that step “Existing Contact”, so we will use the next query:
https://%5BOrganisationName%5D.crm%5Bx%5D.dynamics.com/xrmservices/2011/OrganizationData.svc/WorkflowSet?$filter=substringof(‘Existing Contact‘,Xaml) and Type/Value eq 1
Just putting that query in IE, we will see the next results:
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:
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:
Where “uzX” is the formula short code.
Putting that query on IE, I will get the next results:
“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:
See below a contact sample with a hashcode (below full name attribute), which has been generated by the above process:
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: