Wednesday, February 08, 2017

Dynamics 365 new BPF architecture gotcha

The new Dynamics 365 release of CRM or as I like to call it 8.2, as that makes it a bit simpler. Dynamics 365 is a bit ambigious, it can mean AX and NAV as well and at the same time I want to discuss the platform and not just an app... so it becomes trick. I hope Microsoft figures some decent naming for the xRM part of the platform so we all have something to call it. (hint... xRM is a decent word)

Well, one of the cool new features of the 8.2 release is the revamp of the Business Process Flows (BPF) which now have gotten a couple of different facelifts, of which some are:

  • A new editor which looks identical to the Business rules editor. However, the Workflow editor is still very old-style... I wonder if this might be next. :)
  • BPF:s final stage can now be closed/or you actually close the entire BPF. This was not the case previously where the last stage simply sat there.
  • If you have multiple BPF:s and you switch between them, D365 will remember where you are in each of the BPF:s. This was not the case in earlier versions when it always restarted when you changed.

In order to handle the last point, the underlying architecture of the BPFs have been changed. Previously when you had an entity that was BPF enabled by a lookup called "Process stage" and when this changed you knew that the record had changed stage in the workflow.

Alas, in comes 8.2 on its white horse, and "Process stage" lookup falls dead to the ground like knight before a modern day tank. In other words, it simply isn't triggered.

The new BPF architecture is based on the principle that a new shadow entity is created for each BPF that you create. And yes, they are removed when you remove your BPF.

So, when is this typically a problem? The most common uses for triggering on stage changes in BPF is using a Workflow to trigger on changes in an Opportunity to set the probability. This is then later used in calculated fields like Weighted Estimated Revenue (not a standard field) and similar fields.

The effect upgrading to 8.2, which is just a minor upgrade from an upgrade perspective, is hence that these customizations that you might have done to set the probability, stop working and the opportunities get the wrong, 0 or no probability making any calculation based on this number incorrect.

So, how are you supposed to fix this? There is a new WF triggering mechanism built in to the BPF designer. You simply create a workflow that can be manually triggered, and drag a workflow compontent into the appropriate step in the BPF designer.

Do note that you can choose if you want it to trigger when the stage is started or completed.
BPF Editor with a workflow added with the Stage Entry trigger selected as highlighted

And this is how the workflows needs to look
This is the workflow that was selected in the BPF Editor above. Note the highlighted checkbox. This needs to be checked in order for the workflow to show up in the BPF editor lookup

A final comment. Even though the BPFs can now be completed, that does not mean that the final stage's Stage Exit is triggered. As far as I have understood it, it is still in this phase even though the BPF in it self is considered closed. I would call semantics on that. I hope Microsoft fixes that bug or enhances that lack of feature if they rather call it that.

Was this original workflow supported? Was it ignorant of your partner, you might ask, to create a workflow that triggered as described in the old manner and this has now stopped working and you
are faced with additional costs for fixing this? Shouln't they have known? Well, frankly no, your partner, if they followed what I described above, did make what are called "supported customizations" which according to the documentation from Microsoft is supposed to be upgradable. At least one major version, often 2 or 3 major versions This time it was not even a minor, from 8.1 to 8.2. Hence it is a regrettable situation but if you want to complain somewhere, I do suggest you complain to Microsoft.

Gustaf Westerlund
MVP, Founder and Principal Consultant at CRM-konsulterna AB

Monday, February 06, 2017

Finding URL to dependencies on installed managed solutions

Uninstalling a managed solution? (ie Deleting it) Getting a bad error message saying you can´t? (Cannot Delete Component) And you don't know how to find what the dependencies are for the solution? So did I. And perhaps you, as I, did not notice the small link in the dialog which says "Details" that takes you directly to the "Dependencies" page.

Click this to go see the dependencies for the solution,
or follow the instructions below to manually generate an URL 
So, if you did miss that, or for some other reason want to know how to get to the dependency page of a solution, read on.

I found this blog article:

which described how to find the dependencies in a nice way in a CRM 2013/2015 on-prem environment where you have access to the database. But I was using Dynamics 365 (8.2) so that was no option.

The one part you cannot do in an online instance, in that article is to open the SQL database, in case you tried. So the trick was to find some other way to find the guid of the managed solution and it is of course quite simple, just right click it and select "Email a link" and your favorite email editor will open with the guid shown and you just have to know which part to cut, see the picture below:

Cut the guid between the %7b abd %7d which are the { and the }

Then just follow the instructions from the blog above and insert the guid into the url provided:

https://YOUR CRM URL/tools/dependency/dependencyviewdialog.aspx?objectid=GUID&objecttype=7100&operationtype=dependenciesforuninstall

Replacing "YOUR CRM URL" with the url to your D365 and GUID with the guid above.

That got me to this page, which after some de-privatization looks like a document from the Swedish tax authorities:

Thanks again to InteractiveWebs for the original article.

Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB

Sunday, February 05, 2017

Emailing Queues internally - OrgDBOrg to the rescue

Using queues is in D365/CRM for managing functional email addresses is the the only way to go as
far as I know, unless you want to set it up as a full user, which I don't really see the point of.

I recently ran into an interesting issue with a customer pertaining to queues and that is when you want to be able to forward mails internally to users that are registered in D365/CRM. What happens is that with the standard setting you will get two emails. Hence, you might think that going into System settings and the email tab and unchecking the "Track emails sent between CRM users as two activities". However, this will have the unpleasant effect of disabling internal emails to queues, or in other words, if an internal user sends an email to a queue, to a system with this setting unchecked, D365/CRM will simply ignore the mail and not pull it into the D365/CRM.
By RRZE - Own work, CC BY-SA 3.0, Link

So, do we have to choose between duplicate emails for internal users and being able to send emails from internal users or not getting duplicates and no emails from internal users? Well, no, there is a very special set of settings to the rescue, OrgDBOrg, which are described here:

There is a setting here called: DoNotIgnoreInternalEmailToQueues which by default is set to False. So, if you uncheck the "Track email sent between to activities" and then set this to True, the system will not ignore your internal emails.

A small word of caution, OrgDBOrg settings are fringe (but still supported) settings which hence are probable not as tested as normal settings in D365. I would hence recommend that you only use OrgDBOrg setting in the case you need very specifically them.

Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB

Wednesday, February 01, 2017

Dev L300 Training in Stockholm!

George Doubinski is coming to Stockholm and he is going to be holding a very rare level 300 (= advanced) Dynamics 365 developer training.

George is an MVP and a good friend of mine and one of the bright beacons in the D365 community, co-founder of both and . He is an excellent developer who told me that he is always striving to learning something new. Last he said his goal was to learn a new programming language every year. And to top that off, he is a great presentor and teacher as he is a lot of fun to listen to and almost none can match his skills when it comes to coding in Dynamics 365.

We at CRM-Konsulterna were very happy when we were able to convince him to come to Sweden and Stockholm and teach us some of what he knows! He lives in Australia so this doesn't happen often.

Read more about it here:

Hope to see you there!

Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB