Dynamics 365 – You cannot stop Dynamics 365 updating but you can be prepared

If there is no struggle, there is no progress. Frederick Douglass

Dynamics 365 will always surprise you #HoskCodeWisdom

Microsoft Dynamics 365 is evolving. Patches, revisions get added without knowledge or consent of users, major changes must be scheduled and customisations tested.  Most patches fix bugs and improves Dynamics 365 but sometimes changing code causes bugs and problems.

Microsoft Dynamics versions

Version numbering for Dynamics 365 is like Dynamics solutions versions


The current release is of Dynamics 365

Read more New naming conventions for Microsoft Dynamics CRM updates

Major releases and numbers

Dynamics 365 as a service

Microsoft Dynamics 365 is a service,  developers cannot access any servers (Front end, back end or SQL server).

Microsoft installs, configures and maintains the servers for our Online Dynamics 365 instance, charging you for this work in your monthly licence cost.

Developers have less control and flexibility.  We cannot scale up servers, SQL databases or performance.  We can’t change database or server settings, we don’t have access and need to work with what is there.

The lack of scaling, configure servers and limitations of Dynamics 365 online developers need to to move heavy processing out of Dynamics 365 and into Azure (avoids performance being throttled) and to enable long running processes.

Plugins and custom workflows in Dynamics 365 online run in sandbox mode which has many limitations, one of the fundamental limitations is plugins/custom workflows must finish within 2 minutes (yes even async workflows run in the sandbox) – Understanding Plugin sandbox mode.

This post covers best practices of Dynamics 365 online architecture

What are the limitations of Microsoft Dynamics CRM Online and how do you work with them?

Upgrades and updates

Microsoft Dynamics 365 delivers a major release every 2 years (the first number, current version 8) and a minor release every is 6 months.  Microsoft Dynamics 365 has added functionality which allows you to delay updates but you must update once a year (you cannot delay) or before a major release.

You need to manage and plan for updates

Manage Microsoft Dynamics 365 (online) updates

There is pressure to keep up with the releases and not waste time testing the new releases because they cannot avoid taking them.

For the Major and minor releases, admins decided when to apply the update and test the update on sandbox instances.

For build and revision releases Microsoft can apply these any time and regularly applies small patches to fix minor bugs.   Microsoft promises not change anything significant in patch updates.

Patch releases are not always minor

At Extreme 2017 heard a story where Microsoft depreciated a security protocol but hadn’t removed it from the code yet.  Developers were told not to use it, Microsoft being busy didn’t get round to removing it until a few months later and then did so in a patch release.

When the release went live Microsoft noticed a massive drop in Dynamics 365 usage in Australia, lots of code using not supported security protocol stopped working.  Microsoft  naughty making major changes in a patch release rolled this back within in a couple of hours.

A CRM 2011 upgrade which after installed, changed their database and their Dynamics CRM didn’t work.   This lead me to writing the post

Should you keep up with Microsoft Dynamics CRM release cycle?

Microsoft moved to parallel JavaScript loading, which broke everyone’s form load script with the infamous CRM 2011 rollup 12.  I wrote about it in the post

CRM 2015 SP1 – Turbo forms use asynchronous JavaScript web resource loading

Scott Durow saved many a CRM developer with his post Asynchronous loading of JavaScript Web Resources after U12/POLARIS

I recommend you follow Scott’s blog and use the awesome Ribbon Workbench.

When patches attack

Microsoft applied a small/patch release and broke our DevOp‘s automatic deployments.

Over a weekend Microsoft updated our  instances from version to version over weekend.  We noticed because a trial instance was, our instances were

This caused problems, the extract customisations script stopped working because the new version of Dynamics 365 needs new versions of client assemblies ( to

It’s obvious when you know the cause but it we came in to automatic deployments not working and a generic error.  It took a few hours of investigation to find the solution.

Better way

A minor release shouldn’t need an update of client assemblies to interact with Dynamics 365.  If Microsoft wants Dynamics 365 to deliver Enterprise projects, they need to improve the communication and effect of updates.  If they alerted about updated assemblies we could have avoided wasting time diagnosing the problems.

When working with Dynamics 365 online and other online services you have to be ready to diagnose problems, deal with upgrades and potential problems.

Change will happen whether you are ready for it or not #HoskWisdom


Dynamics Salary survey 2017

Price is what you pay. Value is what you get. Warren Buffett

Money should never be the key factor in any decision #HoskWisdom

Nigel Frank do a salary survey every year and it’s improved the insights in the report year on year.

The key highlight is the average wages Dynamics roles earn but there are other interesting insights to make Dynamics professionals and employees think.

The survey won’t cost you to download but you need to give contact details (email, phone) and I’m sure you will be rewarded by being contacted by Nigel Frank in the future.

Nigel Frank Salary Survey 2017

I previously wrote about salary survey in 2016

Interesting Insights

Take into account the survey is a global survey and across all the Dynamics products (Dynamics 365, CRM, AX, NAV, etc)

Below are the insights which interest me

85% of candidates we place stay in their current position for over two years.


People will move job 20 times their career, so staying in the same job for 2 years for a career for 40 years is broadly right.

After getting 2 years experience in a new role, external employers will pay more for that experience than the company who is employing them.  This is the difference between a company paying a percentage increase (lets say 5%) and a new company offering a larger pay increase (the value of the experience gained).

2 or 3 years will be people looking to make the next step in their career, many people can get stuck in a position and their career stagnate, looking opportunities elsewhere.  e.g. Career + more pay = move.

21.3 % have been in their current role less than a year


A fifth of the people responding to a the Nigel Frank survey had only recently moved, maybe they filled in the survey because Nigel Frank helped them find a new role.  It seems a lot.

Career Development – Lack of progression opportunities cited as the main reason for job dissatisfaction, while only 39% of respondents were happy with in-house training.


Most companies don’t seem to invest in people, seeing this as a cost instead of an investment.  It reminds me of this quote from Richard Branson

“Train people well enough so they can leave, treat them well enough so they don’t want to.” Richard Branson


I find the lack of training surprising and disappointing because in Microsoft Dynamics industry its all about the people.  Most companies in the Dynamics 365 industry don’t have products and mainly deliver projects and consultancy.  It would make sense to invest in training for those people

Salary – 54% of professionals were satisfied with their salary, while 67% felt that gaining the right type of experience is more important than salary.


People always want more money but I believe if you get the experience and skills then you will be paid the money you are worth.  Focus on learning, become awesome and you will get the wages you deserve.


85% are male

less than 2% are under 24 – Why is there so few graduates in Dynamics?

39 % are older than 41 with 41% between 31 and 40.


I understand Dynamics isn’t a sexy industry to attract people from university and graduates but its a low figure. Experienced people are maybe more suited to Dynamics projects which usually involve more customer interaction.  Dynamics can’t be delivered by coders alone, the projects need close interaction with the business and users.

Most common challenges of Implementing Dynamics products

  • Data migration 52%
  • User adoption 38%
  • Lack of appropriate skills 36%
  • Cost of custom integration 33%

Top reasons to move jobs

  • 37% lack of leadership and vision
  • 50% lack of career or promotion prospects

Here are the salaries for the popular roles, there are more in the survey so check it out.

Picture from here


Dynamics 365 – Solutions and stage for upgrade

Courage is fear holding on a minute longer. George S. Patton

Don’t try to avoid failure, make sure you recover #HoskWisdom

Stage for upgrade is useful functionality which allows you delete customisations and components from managed solutions, this post talks about solutions, holding solutions, stage for upgrade and bugs


Before you can understand holding solutions and stage for upgrade you need to understand solutions. start with these posts

Microsoft Dynamics 365 uses managed solutions to copy customizations from one Dynamics 365 environment to another (e.g. Development –>Test –> SIT –> UAT –> production).  Managed solutions make  customizations non editable in the target Dynamics 365 environment.

key points

  • Solution is they are additive and they can only add customisations.
  • When you delete a solution it removes the data too.

below are some interesting post I have written on solutions, best practices and problems

Holding solutions

To remove unwanted customisations you needed to use a holding solution to temporarily hold customisations whilst you deleted one solution, an updated solution is imported the customisations removed.

This post walks through the process How to – Delete Components from Managed Solution in Dynamics CRM 2016 without using Holding Solution

Microsoft has simplified this process by automating the holding solution process and having a stage for upgrade checkbox (which uses a holding solution in the background), read this post for more details

This post covers stage for upgrade and patching – Solution Patching in Microsoft Dynamics CRM 2016

Microsoft documentation – Create patches to simplify solution updates


There is a bug in the stage for upgrade functionality/holding solution process which fails to import the solution or fails to apply the solution upgrade.  The error happens during the import of the solution and you can’t import a solution into the environment.  We can consistently recreate this if any of the entities has an SLA enabled.

There have been other problems with stage for upgrade and removing customisations but we can’t work out what the problem is because we can’t see the SQL environment.

You can reset the Dynamics 365 CRM instance, import  solutions and data on a clean Dynamics 365 CRM instance.  The Capgemini Dynamics team store code and CRM customisations in source control, giving the ability to create solutions with the latest customisation and deploy solutions into an environment.  The deployment scripts can import configuration data with different data for sprint and dev environments.

This approach is OK for sandbox environments (DEV, test, etc) but if this happened in production it causes major problems because the environment cannot be reset without loosing all the data.

Resetting Dynamics 365 environments

We have problems resetting sandbox environments it becomes stuck and the only way to resolve the problem is wait for Microsoft to run an SQL script (which they do around midnight) which fixes the environment.  It’s frustrating we have to wait a whole day, particularly when we have had it twice on one day.

If Microsoft wants to promote Dynamics 365 online and enterprise projects (which use multiple Dynamics 365 instances) then it must provide the tools necessary to manage multiple environments and allow enterprise projects to be delivered using Dynamics 365.

picture from here


Dynamics 365 – Problems debugging fields on a form

“ If debugging is the process of removing software bugs, then programming must be the process of putting them in. ” – Edsger Dijkstra

Dynamics 365 is a place where only dirty entities and fields are saved! The clean fields are ignored #HoskCodeWisdom

  • Junior developer – assumes how things work
  • Good developer – finds out through trial and error
  • Great developer – does not assume and methodically confirms

Dynamics 365 can frustrate developers (The Frustrations of a CRM Developer), developers are provoked by the idiosyncratics, limitations and bonkersness of Dynamics 365 as Microsoft works on new ways to annoy developers 🙂

Bugs and problems areopportunities to gain a deeper knowledge of the workings of Dynamics 365.

New developers get caught out such as in the CRM 2011 (good old) when SetSubmitMode was a rite of passage for Dynamics CRM developers – CRM 2011/2013 – What does setSubmitMode do? and how does it work?

Unless you made the field dirty and change SubmitMode the field was not sent to the database to be saved

Try, Try and try again

On creation of an appointment the start and end times should be editable, on a form update those fields should be readonly.

Examples of using the SetDisabled(true) were found in the code, copied and adapted for the start and end times on the appointment entity.

He kept debugging and being puzzled because the start and end times were not changing, but why not?

Insanity: doing the same thing over and over again and expecting different results.  Albert Einstein

Developer Insanity: Testing the same code over and over and expecting intermittent result #HoskCodeWisdom

Hosk developer debugging beliefs

  • Investigate bugs with an empty mind
  • Microsoft 365 is full of quirks which make sharing knowledge between team members important
  • Bugs are not a sign of a bad developer, they are a sign of a developer developing #HoskCodeWisdom
  • Always help your fellow developers, big projects need a strong team.  Never leave a developer stranded
  • Don’t suffer in silence if you are not making progress, get help and get direction #HoskWisdom

SetDisabled = true

The way to make a read-only field editable is to use the Dynamics 365 JavaScript Xrm, get the control and use the setDisabled(false)

Xrm.Page.ui.controls.get(“your field name”).setDisabled (true); //Field readonly you can’t write any thing on field

if you change true as false;

Xrm.Page.ui.controls.get(“your field name”).setDisabled (false); //Anyone can put value on this field

I looked at the code, it looked fine, we checked a few things

  • Is there any other code changing the field back to read only –> No
  • Checked the line worked in the debugging console –> Yes
  • Was there a JavaScript error –> No
  • Debug the code, does it run the line of code which enables the field –> Yes

Appointment entity

In this example we used the appointment entity, which is an odd entity.  It‘s not possible to add new forms for the appointment entity Dynamics 365 – You can’t add new forms to the appointment entity There is code running on the appointment entity which a CRM developer has no control over, cannot see and cannot edit.

When you book appointment it sets the user who booked the appointment as the organizer of the appointment.  This is fine for Outlook but not what I wanted to happen in Dynamics 365.

Adding hidden custom code which developers can’t disable is frustrating as much as it is undocumented, believe Microsoft should write customizations in the same way standard Dynamics 365 developers do. This would allow us to see, modify, disable or extend the default behavior.

Stop, think

When you rule out the obvious, it’s time to check the stupid – #HoskWisdom

Appointment entities don’t allow you to add new forms (or change the status/status reason of the appointment) because we couldn’t add new forms, we had JavaScript which when the regarding field was set to a specific custom entity we disabled the default section and showed a new section with custom fields on.

Usually a developer would create another form but we couldn’t because it was the appointment entity

This resulted in the same fields being on the form twice, the start and end times.  So the code was working, except it was making the fields on the hidden section and the first fields on the form.

To resolve the problem go to the section (in code) and then retrieve the field you want and then make it make it editable.

Hosk values with bug fixing

  • Developers who fix a problem which doesn’t keep popping back because it‘s not properly fixed
  • Developers who use a bug as an opportunity to learn how Dynamics 365 works
  • Developers should try to resolve the problem first before asking for help
  • Don’t spend too long being puzzled by a bug before asking for help, Dynamics 365 has odd quirks and limitations which can take hours to resolve.  Get direction from a colleague after 1 hour of frustration
  • Developers should not assume, they must clarify (I wasted hours looking in the wrong place because I didn’t check my assumptions)

On a separate note but relatedish – Developers using JavaScript onload should be careful when setting and changing values because it can frustrate user by asking them to save a form when they haven’t change any values When to automatically change fields using Javascript 

picture from here


Don’t let a marshmallow crush your project


“The only real mistake is the one from which we learn nothing.” – Henry Ford

When people can think of the team before themselves, the team can achieve great things #HoskWisdom

Code not in production has no value, you don’t know if it will work, get it live in the shortest time possible.


  1.  Get your code finished into production and the customer starts to get value
  2. The longer code isn’t in production, the larger the risk it won’t work or be what the users need
  3. Test your design with a prototype is always better than having a design on paper
  4. Politics and positioning for power can slow and divert projects
  5. Adults fear failure/mistakes more than children and because of it they make bigger mistakes

Build a tower

A popular team building exercise sets teams of four people to build the tallest tower possible using 20 sticks of spaghetti, sticky tape, string and a marshmallow which has to sit on top.

Ted talk – Build a tower, building a team

here are some crazy designs

I attended a similar exercise using spaghetti and jelly babies.  It was a fun(ish) but lacked a point but getting to know your team is important, so it all helps.

Common problems

Many individuals waste time jockeying for position, trying to assert their authority at the expense of doing the task well.  The video states children don’t waste time doing this, they focus on the task not people and position.

Many of the people doing the exercise will create the spaghetti tower and leave putting the marshmallow on the top at the end, with one minute to go.  This leads to a either successfully putting the marshmallow on the top or the marshmallow destroying the towr because it‘s too heavy.

Most teams leave creating prototypes and testing their designs until the last minute, with no time to adjust.

Mr Stay Puft visits your project

Dr Ray Stantz: [after Ray thinks of the Stay Puft Marshmallow Man and it appears, stomping through New York City] I tried to think of the most harmless thing. Something I loved from my childhood. Something that could never, ever possibly destroy us. Mr. Stay Puft.

Dr. Peter Venkman: Nice thinking, Ray.


Leaving the marshmallow until the end is the classic waterfall approach to projects, the marshmallow in the project can be

  • Show the customer and finding out it‘s not what they want
  • The functionality does not work
  • The functionality doesn’t work the way the users/business needs
  • performance problems
  • The integrations don’t work

Waterfall projects leave the risk (the marshmallow) until the end and leaving no time to change or adapt.

You can tell Mr Stay Puft will visit your project when the requirements and functionality are not linked to business goals and there is a lack of business input.  IT projects are a collaboration between the business and developers.

If it smells like agile

The most successful teams created prototypes and put the marshmallow on their tower at the earliest moment.  Creating working examples is key, you can try a different design if the marshmallow squashes your design and you can adapt working designs.

Agile aims to get functionality finished and into production as soon as possible, allowing user to see and use it as soon as possible.  This stops the two sides drifting apart because at the end of every sprint they are pulled together to review progress and get feedback.

Agile is great when done well and the customer engages in the agile process, I have discussed Scrum in a blog post before

There are many projects which are Agile in name but chaos in reality #HoskWisdom 

Many businesses cannot fight the desire to plan out the project and costs, despite everyone knowing long term planning is never accurate.  It helps to remember another name for estimate is guess and adjust your confidence levels accordingly.

On your next project, get code into production as soon as possible to ensure you are creating what’s needed, what’s wanted and what works.

pictures from here, here



Hosk’s Top Dynamics 365 Articles of the week – 16th June


But man is not made for defeat. A man can be destroyed but not defeated. Ernest Hemingway


Want more #HoskWisdom then follow #HoskWisdom, #HoskCodeWisdom or follow @BenHosk 

  • The pressure to make things complex will be great but you must keep it as simple as possible #HoskWisdom
  • Don’t waste words, make every one count #HoskWisdom
  • If you can deliver the same message with fewer words then do so #HoskWisdom
  • if you tried your hardest you have nothing to regret #HoskWisdom
  • Constantly talking about doing something is a barrier to doing something #HoskWisdom
  • Speak less, listen more and think often #HoskWisdom
  • If something has no value, stop measuring it #HoskWisdom
  • Contributing to a successful team is better than achieving personal goals #HoskWisdom
  • People admire Dad dancing because it is a state of mind only achieved by those who are not constrained by popular opinion #HoskWisdom
  • Leaders don’t try to win the race they try to get everyone to finish #HoskWisdom
  • Don’t over think and under act #HoskWisdom
  • Thinking should not stop action #HoskWisdom
  • Respect silence, its thinking time #HoskWisdom
  • Don’t waste your energy fighting the inevitable, instead choose to be prepared #HoskWisdom
  • Bosses should tell employees where they can do better but most don’t #HoskWisdom
  • I like to start the day with a steaming hot cup of Microsoft Dynamics 365 #HoskWisdom
  • Win when you can, lose if you must but always enjoy it #HoskWisdom
  • There are no shortcuts in delivering successful projects #HoskWisdom
  • Be relentless about improving #HoskWisdom
  • You won’t win if you are afraid of losing #HoskWisdom
  • Rejection makes you serious about a goal or helps you decide it’s not important #HoskWisdom
  • When a pupil isn’t doing well the reason is often due to bad teaching #HoskWisdom
  • You cannot go back to what you were, you can only move forward to what you will be #HoskWisdom
  • When conflict becomes personal, it becomes a problem #HoskWisdom
  • For the people who achieve, tomorrow is too late #HoskWisdom
  • If you lose because of a lack of preparation then you beat yourself #HoskWisdom
  • No one will follow a leader who isn’t good at his job #HoskWisdom
  • When you let sleeping dogs lie, be prepared to be woken by those dogs in the future #HoskWisdom

Articles of the week


Generic framework to delete all child records when a parent record is deleted in Dynamics 365 using Microsoft Flows

Best of the rest

Restarting Record Creation and Update Rules in Dynamics 365

Dynamics 365 UK data centres

 Insights from Extreme 365

Simple, No fuss, Dynamics 365 Deployment Task Runner

How to register an early bound library within Microsoft Dynamics CRM Online Sandbox Isolation Mode Part 1

word document templates for complex data retrieval

you can optimize queries in Dynamics 365 online! it doesn’t say what it does but it’s probably magic

Calling Azure Functions (GenericWebHook-Csharp) from CRM

Tip #863: Learn TypeScript

Facial Recognition using Dynamics 365, PowerApps and FaceAPI

Best of the rest

Recurring Jobs Strategies for Dynamics CRM/365

The New Social Selling Assistant in Dynamics 365

Dynamics 365 Partner Community: Using PowerApps and Microsoft Flow with Dynamics 365

CafeX, Live Assist – My Initial Install (With USD)


Record Specific Power BI Reports in Dynamics 365 (only one click away)

Managing Dynamics 365 Online Encryption Key


Shutting down CodePlex

popular dev articles this week

Here’s What You Can Learn In 10 Minutes That Will Be Useful For The Rest Of Your Programming Career

Writing My First Compiler

Continuous everything in DevOps…what is the difference between CI, CD, CD…?

The Agile Mindset 

Tips To Be a Successful Scrum Master

awesome information for Scrum masters

great article on why you should do code reviews

Why is the ‘if’ statement considered evil?


I woke up at 3 a.m. to spend 12 hours learning what it takes to be a leader from former Navy SEALs

How I Became More Comfortable With Public Speaking

9 Books Which Made Me an Adult (And 1 You Should Read Anyway)

16 Memorable Books I read in 2016

Flow Doesn’t Lead to Mastery

Why Are Maker Schedules So Rare?

Darwin was a slacker

What Your Moonshot Can Learn from the Apollo Program

How to get employees to work faster

Man’s tweet about pie charts being useless causes hilarious chaos

Star Wars

Tina Fey improve tips

The Hosk – currently reading

Hosk’s CRM Developer Articles

A collection of my favorite CRM Developer articles I have written

CRM 2016 – Tips on passing the MB2-712 customization and config exam

All the CRM 2016 content to help you pass the exam

picture from here


Dynamics 365 – How to install the Microsoft Dynamics 365 Developer Toolkit


I blogged about uninstalling the Microsoft Dynamics 365 Developer Toolkit and released I hadn’t explained how to install the Microsoft Dynamics 365 Developer Toolkit

If you want to learn what the developer toolkit is and why it’s useful, read this page

You can find manually download the toolkit here

Microsoft Dynamics 365 Developer Toolkit marketplace

The quickest way to install the Microsoft Dynamics 365 Developer Toolkit is straight from Visual Studio.

Go to Tools –> Extensions and updates

search for Microsoft Dynamics 365 Developer toolkit




You will then be able to create Dynamics 365 projects and connect to Dynamics 365 projects.

I would recommend getting the latest version of the Dynamics 365 SDK and regularly update the Developer toolkit because it has a few bugs but they are fixing them regularly