A few days back I had posted an article where I encountered an issue with Update 2.1 (8.2.1) for Dynamics 365 On Premise. It had to do with Two Options where they were getting reset after random intervals (as if something in the background was causing it to reset) if Auto Save was turned on.
This time, we deal with a different and really annoying and showstopper (at least for us) issue that Update 2.1 introduced. This is even worse since it has to do with the Workflow Designer in Dynamics 365 On Premise. Now Workflows are something that not only do we developers work with, but sometimes business users might go in and change stuff around since it’s meant to be business user friendly with absolutely no code involved in it.
What is the Issue?
The issue was, if you are trying to update an entity record which has an Option Set and you’re trying to set a dynamic value (based on some other Option Set) or attempting to even clear the value, you can’t do it. When you click on the Option Set in the Workflow Designer (form that shows all the fields), you simply don’t get any options on the right hand pane as you might be expecting. Now if you happen to select any other field before you select the Option Set, the options for setting the value in the right hand pane don’t change.
This is what you’d probably be seeing.
Really annoying and a bummer, isn’t it? Now you’re stuck thinking what might have dawned on you to go ahead and apply the Update 2.1 in your environment with so much enthusiasm.
Now, a few blogs on the internet will tell you to find an environment running on Dynamics 365 Update 2.0 (8.2.0), export your workflow via a Solution from your “just ruined” environment (on 8.2.1) to the 8.2.0 environment, make the Workflow changes and import it back to your corrupted environment. Easy as it may sound, there are two challenges:
- Where do you get an environment running on 8.2.0? Online trials won’t give you any since they are running on latest version. Do you have enough resources in your workstation to install a VMWare, Windows, SQL Server, Active Directory, Dynamics 365 (with multiple updates till 8.2.0) and then do the changes? So much for a simple change! Gives you fever, doesn’t it?
- Let’s say you succeed in achieving #1, now what? I am pretty sure your workflow isn’t a simple one as just updating a record. A real life workflow is much more to that. You are dealing with multiple entities, emails, maybe some record assignments to Team or Users, and a whole lot of stuff. Do you realize for you to change your workflow in your newly spun up 8.2.0 environment, you have to move your custom entities, Teams, Users, and what not. See what this means? And most of the time, it might not even be possible to recreate those same Users. Makes you want to give up, doesn’t it? Makes you want to bang your head on the Computer screen and scream out loud “What the f@#k was I thinking when I applied the Update 2.1”? Even better, you can’t uninstall it.
You google being frustrated and you stumble upon my blog! Hey there, I was in the same boat as you! But no worries, I got a fix for you! And something that will actually work.
Wait, when did this issue creep up?
The issue was introduced in Update 2.1 but didn’t exist in Update 2.0. Which means, Update 2.1 definitely replaced some files in your CRM installation folder which caused this. It couldn’t be any database script, since it has to do with the UI, the Workflow Designer to be specific. Most likely it’s a CSS, or maybe Script file (since you’ll hardly find any html file in CRM installed folder with any editable coherent content in it). That’s right! It is indeed a Script file and the culprit is a file called “slugsupport.js” that resides in the “C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\SFA\workflow” directory in the Server where Dynamics 365 is installed.
Microsoft made this minor modification which broke the Workflow Designer. Now there could be other files as well that, in association with this change, is causing the issue.
Just give me the fix, will you?!?
So how do you fix it? You don’t happen to have the version of this “slugsupport.js” file from Update 2.0 (8.2.0), do you? If you can grab it from some other environment (say maybe you upgraded your development environment, but your test environment is still running on your previous version), that great! All you have to do is go and replace the file existing for 8.2.1 with the file from version 8.2.0.
If you don’t, here’s the download link to the file from Update 2.0 (8.2.0). Just replace the “slugsupport.js” in the “C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\SFA\workflow” directory in the Server where Dynamics 365 is installed, restart your server (although an IIS Reset should be good enough) and make sure to clear your browser cache!
Voila, you should have your working Workflow Designer back! Sigh of relief!
According to the tests that I have run with the older version of this file, everything seems to be working, meaning nothing is broken during the runtime (actual workflow execution).
Is this supported and recommended? Well, that’s the first question that came to my mind, but since the Microsoft Support Personnel himself recommended this approach, I think we are not in a risky situation.
When will this be fixed? Hopefully in the next update release and I am not referring to the July 9.0 update that’s coming out in a few days with tons of new features. I was said that the update that would probably be released around September would most probably have this fix.
Once again here’s the download link for “slugsupport.js” from Update 2.0 (8.2.0).