Skip to content

Category: Revive

Bug in business process flows created before december 2016 update (CRM v8.2)

Posted in Dynamics 365, Power Platform, and Revive

Microsoft has intoduced some really nice features with Dynamics 365 (CRM v8.2), but also a bug for business process flows of existing customers created before the december 2016 update. This causes an error message on switching to another business process flow or the completly disappearance of the business process flows from the form.

Jiří Pešík has already blogged a method to identify and resolve the issue, but from my point of view it is not cloud suitable and not supported,because there are changes made directly on the database.

Cause

With the new features came also new fields in the system. Unfortunately they haven’t been filled during the update for already existing business process flows. One of them is the required field “uniquename” of the “workflow” entity. You can even see it when open the details pane of the new business process flow editor.

Identification

You can use a simple query in the advanced find to identify concerned business process flows.

Resolution

Is just as easy as the identification. Deactivate your business process flow and the system will fill the name automatically and you can activate it again immediately. No code, no sql, just magic. 😉

Empty pipelinephase on opportunity quickcreate

Posted in Dynamics 365, Power Platform, and Revive

You all know the most common usage of the pipelinephase field of an opportunity. It’s the sales funnel chart in sales dashboards.
By default the pipelinephase field is filled with the number of the current business process, followed by its name. But sometimes it stays empty. You can imagine how unhappy the sales guys are about that.

What I found out

It depends on how you create the opportunity. If you create an opportunity through the quickcreate feature, where it does not matter if you use the global “+” sign or the contextual “+” sign of a subgrid to create it, the pipelinephase field will not be filled until you step further in the next phase.

Workaround

Build an asynchronous workflow on opportunities that is triggered on create and fills the pipelinephase field if it is empty.

Below you find a solution to download that contains this workflow. It takes dynamically the phase name of the current business process. It is also an ondemand workflow, so that you can run from a view or advanced find that shows you all open opportunities with an empty pipelinephase field.

Issue reporting

There is already an proposal on CRM-Ideas for this issue. You can find it H E R E. It is already 9 month old and has only 4 votes. My appeal to you, follow the link, sign in and vote for it. The more votes it get, the higher is the attention from Microsoft.

Internet Explorer and promises

Posted in Dynamics 365, Power Platform, and Revive

Microsoft shows us on Get started with the Microsoft Dynamics 365 Web API (client-side JavaScript) how to create a re-usable function using promises. Between the description and the example is a little note box that points out that Internet Explorer 11 doesn’t implement native promises. Most other browsers support promises natively, IE is the problem child – again.
Microsoft further advises that there are several polyfills and libraries which will implement promises to IE. But they don’t tell you how do this in an effective way.

Detection

As you don’t want to add and load superfluous libraries, you have to detect if the browser has promises implemented. In my first approach I used modernizr. 2KB more just for detection. That is not what I wanted and searched for a plain js solution and found it at stackoverflow.

if(typeof Promise !== "undefined" && Promise.toString().indexOf("[native code]") !== -1)
{
    //Your browser is unsuspecting, paste your polyfill or library here.
}

Agony of choice

Now that we can detect if the browser has implemented promises or not, which polyfill or library should we implement additional? My decision fellt on the smallest possible solution I found – ‘ES6 Promise polyfill’ with only 2KB.

ImportSequenceNumber field in Dynamics 365

Posted in Dynamics 365, Power Platform, and Revive

Today I stumbled over the meaning and purpose of the “ImportSequenceNumber” field in Dynamics 365 (or Dynamics CRM, If you have not got used to it like me).

The ImportSequenceNumber field itself

It’s an integer field that is reachable through the field list in a solution. It is searchable but you are not able to add it to a form.

ImportSequenceNumber purpose

Every import in Dynamics 365 is numbered with an ascending number which is globally stored in the “Organization.CurrentImportSequenceNumber” attribute. Every record created during an import gets this number as value for the ImportSequenceNumber field.
By this way Dynamics 365 can show you all records that are created during an specific import or let you delete all records created by an import.

CRM 2016 and Firefox 49 issue with notes

Posted in Dynamics 365, Power Platform, and Revive

Since a few weeks I hear from more and more CRM users that their CRM notes have disappeared. They are all using Dynamics CRM 2016 (Online or Onprem) and Firefox. Other combinations are currently not affected. So it must be an CRM 2016 and Firefox 49 issue with notes on how Firefox retrieves the notes or displays them.

Analysis

You can very quickly see that it is “only” a display problem when you opening the same CRM record with two different Browsers.

But, what happens? To find this out we have to deep dive into the CSS styling of CRM.
The Firefox developertools show us that Firefox has calculated “transparent” as color for the notetext.

A look into the CSS source file shows us what Microsoft has defined as color.

Exkurs: CSS coloring
Colors in CSS can be specified by the following methods:

  • HTML color names (140 named colors are available)
    {color: Aqua;}
  • RGB colors
    {color: rgb(0, 170, 255);}
  • RGBA colors
    {color: rgba(0, 170, 255, 0.5);}
  • HSL colors
    {color: hsl(200, 100, 100);}
  • HSLA colors
    {color: hsla(200, 100, 100, 0.5);}
  • Hexadecimal notation of RGB colors
    {color: #00AAFF;}
  • Hexadecimal shorthand notation of RGB colors. The browser doubles here every digit.
    {color: #0AF;}

CRM 2016 and Firefox 49 issue with notes

Now it is clear to you that Microsoft uses the hexadecimal notation, but not if it also wants to use the shorthand notation. Browsers until now ignored the fourth digit and interpreted it as shorthand notation and calculated #000000 (Black) for the note text. Till now we are talking about an inaccuracy that nobody has disturbed.

Firefox 49 Release Notes from September 20, 2016 – SOURCE
Excerpt: “Added support for specifying colors with an alpha channel using 4- and 8-digit CSS hex color values (#RRGGBBAA and #RGBA)”

BAM! There is the problem. Mozilla introduces the hexadecimal and hexadecimal shorthand notation of RGBA colors
Starting from Version 49, Firefox interprets Microsoft’s inaccuracy as an #RGBA value and calculates #00000000 from it what is black with 0% opacity as result.

Solution

The solution can only be delivered by Microsoft and is already included in Dynamics 365 (CRM V8.2). So I think it will be also fixed within the next update for CRM 2016.

Workaround

Instead of telling you to avoid Firefox until Microsoft provide a fix, I created a small script that corrects the color attribute for the notes. I know, it’s unsupported.

Drag and drop the “CRM Notes Firefox Fix” button on your Firefox bookmark toolbar to use it as bookmarklet. Click it each time you don’t see notes on CRM.