by Gustaf Westerlund | Jul 3, 2017
I just ran into one of the weirdest errors I have seen in my Dynamics CRM/365 carreer, and I have seen a few.
The problem we had was that the case entity had stopped working more or less totally. When trying to open any type of case form either as a normal user or in the form editor, I got a more or less anonymous error message. After a lot of banging my head against the wall and loosing some of my few strands of hair, I finally with the help of Deepesh excellent blog article:
https://dynamicsofdynamicscrm.com/2015/09/22/error-resolutionthe-case-of-the-form-which-stopped-loading-in-dynamics-crm/
it got me on the right track. I did some URL-hacking to try to access the form editor directly and accidentaly got to a mixed form editor. Very weird, but it showed that the form itself wasn’t broken, hence there was something wrong further down… probably the fields, just as Deepesh’s error. And after removing all custom fields, I got it working. Then tediously going back and removing them one by one, I found the culprit, a custom Lookup to the Product.
To give you some more background:
When trying to edit any case form, I got the following error:
When trying to create a new case, I got the following error:
And if I downloaded the file, the contents was: (I have hightlighted the part which has some, but only slight relevance)
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D856E3CEDetail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”>
<ActivityId>a3831d4c-6557-4f8a-b558-ba8c01b97e21</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D856E3CE</Message>
<Timestamp>2017-06-29T13:12:03.5384906Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil=”true” />
<InnerFault>
<ActivityId>a3831d4c-6557-4f8a-b558-ba8c01b97e21</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #5CCC57F6</Message>
<Timestamp>2017-06-29T13:12:03.5384906Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil=”true” />
<InnerFault i:nil=”true” />
<OriginalException i:nil=”true” />
<TraceText i:nil=”true” />
</InnerFault>
<OriginalException i:nil=”true” />
<TraceText i:nil=”true” />
</OrganizationServiceFault>
Here are some facts:
- We had installed a solution that is an upgraded solution, originally from CRM 4 via CRM 2011 and 2013. Not sure if the field definition from the earlier versions are causing this. Probably not.
- I tried switching off all plugin steps. But it didn’t help at all. This is usually what Microsoft support will ask you to do when you have issues why I tried it myself. Always good to try and send this to Microsoft support when registering a support ticket.
- I have tried spinning up a clean 8.2 Dyn 365 with no customizations, creating a solution with just the case entity and importing that. It did not work. Not very strange, as the problem was a field that is causing the problem. Adding solutions does not remove anything unless you are using managed solutions with patches etc.
- I tried exporting a small solution with just the case forms and removed all custom fields from the customization file manually and reimported it. It did not work, which is not strange either, as the error was not on the form.
- I tried creating cases via the API. That did work. I did not use the lookup field that I later found out was the culprit. Perhaps writing something to all fields in the case entity would have generated an error. The reason for doing this was that I wanted to see if I could get an exception in my code that contained more information than what I was getting in the UI. Hence I wasn’t at all happy that it did work.
- I tried retrieving cases via the API. That did work. Again, not happy at all.
- I tried to manufacture the URL to the form ( https://contoso.crm4.dynamics.com/main.aspx?appSolutionId=%7b<solutionguid>%7d&etc=<entityobjectid, 112 for case>&extraqs=formtype%3dmain%26formId%3d<Guid for the ofrm>%26action%3d-1&pagetype=formeditor) That did not work. No form URL with etc=112 works.
- I tried to retrieve the form via the API, that works. Again, not happy, but at least it showed that there probably wasn’t any problem with the form.
- I tried to manufacture a weird URL, with the correct form id with the incorrect EntityObjectID. That showed the form, but with the information that the form is for the “other” entity. Weird, but showed that there is actually nothing wrong with the form itself. I could even edit the caseform this way, move fields, remove fields, but not add new stuff. Totally unsupported way of editing a form, but when in love, war and when Dyn365 buggs out, anything is allowed.See below. This proved to be a very useful, as the form seemed for some very strange reason to be involved in this. The way I proved this was that I had an “original”, instance where the error showed and one where I had got it to work, after removing some fields, and removing all unnecessary fields from the main form. After this I created a solution which only imported the form from the non-functioning instance for the case entity and imported it into the working instance. I had not expected the result, but it actually stopped working. With the error described above. So for some reason the form was part of the problem.
|
A weird Form Editor – the Case form loaded with the Account Entity (EntityTypeCode=1). Be careful when using this, and use at your own risk! |
- I got the same error as above when I try to open the case form in the normal UI.
- When I try to create a new case, I get the error shown in the file “AnErrorHasOccuredWithTimeStampAndLog.png”
- As for what happened with the system just before/during/when this error occurred, we were doing customizations on the case form from a spotty internet Connection, and the case for did work before.
- In the field-section of the Case entity, I selected “Custom” fields, and I have a notion that most of these errors are probably caused by code which mix up custom lookup fields with built in ones. So I would start by looking at lookup fields based on system entities with custom relationships to case like:
- case 1:N case
- product 1:N case
- account 1:N case
- contact 1:N case
- pricelevel 1:N case
- However you might have several fields that are causing errors (I did), and that might make it very tricky to find what is wrong. Cause once you managed to remove the last field causing the error, and then restore the solution and then remove it again, you will find that you are back to a non-functioning entity, and you will have to work your way through each of the fields, with all their dependencies again, until you find the next one. Hence the methodology becomes
- Export solution
- Remove fields until you get the entity to work. Document exactly which fields you try and in which order. Always work in the same order. Remove a field, try to open the case, remove the next field, try to open case form, and so on. All the time documenting, which fields and in which order.
- When you get the case form to work, import the solution again.
- Remove the the field(s) that you know are causing the problems.
- If, after this, it still does not work, go to 2.
- After I removed the fields, and cleaned the form, I recreated the fields with the exact same schema-names and that worked perfectly. Not sure though how it will work when I export it, I am still not sure what is causing this. Probably some erroneous code in the case logic.
- I was able to replicate this error on other instances. So the problem is certainly connected to the solution itself.
So to sum it up. This is most obviously a bug in the Dynamics 365 platform as it should never be able to go into this state. In my case entity the problem was two lookups AND the main “Case” form. After removing the fields and removing all non-necessary stuff from the form by using a URL hack described above, I managed to get it working.
If you run into this, I hope you manage to fix it. It isn’t easy and it will take some time. Hopefully I have given you some pointers.
Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | Jun 28, 2017
Version 9.0 is soon here and it is set to be the largest release ever from Microsoft. The biggest news on my horizon is the relase of the all new Business Edition of Dynamics 365 (BE). This will be an interesting new product and I’d thought I’d write a few lines about it just to clear some things up based on my understanding of the product.
Note that these are my thoughts, they are based on what I have heard and what information I believe is in the public domain (non-NDA). If you know that anything is wrong or have something to add, please leave a comment and I will try to fix it as soon as possible. Due to the high level of spamming I have to use moderation on all comments.
Is it xRM?
Yes, it is going to be based on the xRM platform but it will be using the all new and shiny “Unified Experience” UI which is probably going to be great in many aspects, looks great and everything but also will probably have a glitch or two as it is just coming out the factory doors.
Ok, so can I customize it?
Yes, to some extent you will be able to. It will have specific limits that set it distinctly appart from Enterprise Edition (EE). As of now Microsoft have not been very specific on the details but they have said that the limits will be on:
- The amount of users in the system
- Number of custom entities
- Max amount of GB of usage on disk
I am an ISV developer. Will my ISV 3:rd party addon work with BE?
As far as I understood Microsoft, they will limit ISV addons to only be able to work with the OOB entities in BE. As creating entities in the “normal” CRM/EE has almost no cost, almost all ISV solutions I have seen have at least one custom entity, if not to contain customizations. So, my answer would not be a blanket “no” but a probable, “no”. If your addon isn’t too advanced, you could probably rewrite it to make it work, but with larger addons like for instance ClickDimensions or Resco, I don’t see how that would be possible.
Can I use a sandbox with BE?
No. No non-production instance will be included in the price and as far as I understood, you won’t even be able to buy a non-production or even production instance of BE.
Can I upgrade from BE to EE?
Yes. As it is based on the same xRM framework this will totally be doable on a theoretical plane. However, I don’t know how this will work on a short term basis if, for instance, you start with a BE in Nov 2017 and in Dec 2017 decide that it was too limiting too you and you want to upgrade to EE. The reason for my hesitation in this is that BE will be based on Unified Experience and EE will not at the time of release of 9.0. I would, however, expect 9.0 to catch up further on the line and after it has been upgraded to Unified Experience, then an upgrade of an instance from BE to EE should be no problem.
I bought the interim EE offer for BE pricing level, will I be able to downgrade to BE?
This is a tricky one. First of all Microsoft has not made any public statement on this that I am aware of in either one or the other direction. However, I do think that the key here lies in the level of customizations that you have done to you system. If your EE system falls with the limits of # of users, # of entities and # of GB that is set by MSFT, and also not having any ISV addons not allowed according to BE and any other limitations that Microsoft might come to set before the General Availability (GA) of BE then I think you have a very good chance of being able to downgrade. However, just as I mentioned above in the ISV section, the limitations might be too limiting and creating a lot of entities and adding ISV addons both free and purchased might make it hard to move to BE.
Can I use the Marketing App of BE in EE?
This is a really interesting case, as this is an area where the BE will have a featureset that exceeds EE, at least at the time when it is delivered. In the big overview of all Dynamics 365 Apps (for example the one above) – the Marketing Automation slot is filled by Adobe Marketing. However, for the BE there is a Marketing App which has been created from the bottom up by Microsoft on the xRM platform. Do note that for those of you who were unfortunate to have chosen Microsoft Dynamics Marketing, that product has been discontinued, so that is as of the General Availability of Dynamics 365 (dec 2016) you should really start thinking of moving away from it.
However, the new and shiny Marketing App for BE is strickly speaking only for BE for the time being. I think that the feature set it has is perceived to be too small for the Enterprise segment, although I can perceive many customers using the Enterprise edition that would probably be more than happy with it.
As for the future for the Marketing App in EE only Microsoft knows what they have planned and if I knew I couldn’t have written anything here either. What we know is that they have invested quite a lot of money in building some Marketing Automation features for the BE which is only aimed at the lower end of the customer segment. I would find it noteworthy if they did not leverage that investment in some way in the Enterprise segment as well. However, building a Marketing Automation solution that can match other Enterprise Marketing Automation systems is not something that even Microsoft can do at the flick of the hand, so I would not expect this to show up for at least a year or two. And it might of course be that they will slowly evolve the BE Marketing App until it is fit to grow into the larger Enterprise segment by just turning some switches, but I guess only the future will show.
If Microsoft are investing in building their own EE Marketing Automation App, which does not seem very far fetched althought it might take some time, you might need to take this into consideration if you are considering investing in a new Marketing Automation system for your organization and you are already running Dynamics 365.
If you have any other questions on Dynamice 365 Business Edition, please ask them in the comment. Not sure I can answer, but I can try!
By the way, my blog was awarded the 78:th best CRM blog of all in the world in all CRM categories. Hence the new shiny logo to the right. That was worth some celebration!
Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | Mar 6, 2017
Seems like that Dynamics 365/CRM doesn’t catch all dependencies for managed solutions. This is how you can find and remove one of the tricky ones I got when uninstalling a managed solution which was:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: During Solution Uninstall of Solution Id [solution-guid], cannot find any instances of the component with Component Id c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 and Component Type 2.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>During Solution Uninstall of Solution Id [solution-guid], cannot find any instances of the component with Component Id c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 and Component Type 2.</Message>
<Timestamp>2017-03-06T13:06:54.6280227Z</Timestamp>
<ExceptionSource i:nil=”true” />
<InnerFault i:nil=”true” />
<OriginalException i:nil=”true” />
<TraceText i:nil=”true” />
</OrganizationServiceFault>
After some thinking I figured that this was probably a reference to an attribute (Component type = 2) with the Guid = c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 so I opened another attribute and then cut-n-pasted the url. And it seemed that you didn’t have to worry about the entity guid:
https://<onlineorgname>.<globalcrmcenter>.dynamics.com/tools/systemcustomization/attributes/manageAttribute.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&attributeId=%7bc97cd9d7-a0fa-4ed5-b360-3c2ad998a620%7d&entityId=%7b70816501-edb9-4740-a16c-6a5efbc05d84%7d
Change <onlineorgname> to your org, and <globalcrmcenter> to the crm-subdomain you are using, which for EMEA is crm4.
You will then see the field editor, and can then show the dependencies of the field and remove all of them manually to make sure they are not bothering the Solution uninstall. After that “publish all” and retry removing the solution.
Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | Feb 8, 2017
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
www.crmkonsulterna.se
by Gustaf Westerlund | Feb 5, 2017
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.
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: https://support.microsoft.com/en-us/help/2691237/orgdborgsettings-tool-for-microsoft-dynamics-crm
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
www.crmkonsulterna.se
Recent Comments