Dynamics CRM/365 – Support lifecycle

By Ritchey Hazeu (Dynamics 365 Consultant @ Capgemini)


When you’re working for a customer which is using Dynamics CRM it’s always good to know if Microsoft still supports the current version. It depends on the Service Pack which ‘Support end date’ Microsoft applies.

For the older versions Microsoft applies 5 year Mainstream support and 5 year Extended support. Unfortunately this does not count for every Service pack. For Dynamics 365 it’s 5 year Mainstream support and 2 year Extended support.

An example: A customer is using Dynamics CRM 2016 Service Pack 1. This Service Pack has 23-05-2016 as start date and 08-01-2018 as end date. This means that, before the end date, an upgrade needs to be executed to Dynamics CRM 2016 Service Pack for Dynamics 365 (Service Pack 2).

If you want to know which End date is applied to your, or your customer’s Dynamics CRM solution, you can navigate to https://support.microsoft.com/en-us/lifecycle/search and type in the version.

Rewriting Xrm.Page

By Robin Pietens (Dynamics 365 Consultant @ Capgemini)
For those that have not yet heard: Microsoft has decided to deprecate the use of Xrm.Page.

Microsoft did indicate their understanding that this feature is used a lot, so they will retain compatibility with it for quite some time. However, new functions should be written in a way that is as future-proof as possible right? For some reason I was unable to easilly find a nice overview of what we should change to deal with this deprecation, and I decided to do something about that.

So where we used to write:

function doSomething(){
     var some = Xrm.Page.getAttribute("new_some").getValue(); 
     var action = Xrm.Page.getAttribute("new_action").getValue(); 
     console.log(some + " " + action); 


We should now do something else, and write:

function doSomething(executionContext){
     var formContext = executionContext.getFormContext(); // get formContext 
     // use formContext instead of Xrm.Page 
     var some = formContext.getAttribute("new_some").getValue(); 
     var action = formContext.getAttribute("new_action").getValue(); 
     console.log(some + " " + action); 


The other thing to do is to check the box of ‘pass execution context as first parameter’ when setting up the function on the form. If you, like me, make parameters of just about anything, simply pass them with comma’s separated from the executioncontext. Then put everything except the executioncontext in the box as comma separated parameters that will be passed to the function:


And the function itself will look like this:

function doSomething(executionContext, firstparam, secondparam){
     var formContext = executionContext.getFormContext(); // get formContext
     var some = formContext.getAttribute(firstparam).getValue(); 
     var action = formContext.getAttribute(secondparam).getValue(); 
     console.log(some + " " + action); 


Any new Scripts that you write should conform to the standard outlined in this blogpost. When making changes to existing libraries, it’s a good idea to take it into account as well. Talk the costs and benefits through with your customer, to keep them as upgrade-proof as possible!

If you want to stay up-to-date with features like this one, keep an eye out for new blogposts and follow us on LinkedIn.

For (hard to find) Microsoft references see: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/clientapi-form-context