Earlier this year, the Business Applications team at Microsoft published a blog post titled Modernizing the way we update Dynamics 365, a significant article that anyone involved with Dynamics 365 Customer Engagement (D365CE) should take time to read through carefully. Indeed, as a direct consequence of the announcements contained in this post, you may now be receiving emails similar to the below if you are an administrator of a D365CE instance:

Changes to well-established processes always can produce a mixture of questions, confusion and, in some cases, frustration for IT teams. Once you have fully understood the broader context of where D365CE is going and also the general sea change that has been occurring since Satya Nadella came to the helm of Microsoft, the modifications to the Update Policy are welcome and, arguably, necessary to ensure that D365CE users and administrators can take advantage of the different features available within a D365CE subscription today. For those who are still scratching their head at all of this, what follows is a summary of the most significant changes announced, along with some additional observations from me on why it is important to embrace all these changes wholeheartedly.

Version 9 or Bust

Longstanding D365CE online customers will be used to the regular update cycles and the ability to defer significant application updates for a period. While this can be prudent for more complex deployments, it does potentially lead to additional overhead in the long term, mainly if Microsoft were ever to force this decision upon you. The well-established advice has always been to proactively manage your updates at your own pace, ideally targeting at least one major update a year. If you haven’t been doing this, then you may now be in for a particularly nasty shock. As mentioned in the article:

Since every customer will be updated on the continuous delivery schedule, your organization needs to update to the latest version if you are running an older version of Dynamics 365…For customers who are currently running older versions of Dynamics 365, we will continue to provide you with the ability to schedule an update to the latest version and want to make sure this effort is as seamless as possible through continuous improvements in our update engine…For Dynamics 365 (online) customer engagement applications, we sent update communications in May to all customers running v8.1 and have scheduled updates. Customers running v8.2 should plan to update to the latest version by January 31, 2019.

This point is reinforced in a much more explicit manner in the email above:

ACTION NEEDED: Schedule an update for your organization by August 16, 2018. The date for the update should be on or before January 31, 2019. You can find instructions on how to schedule and approve updates here.

If you do not schedule an update in the timeframe mentioned above, Microsoft will schedule an automatic update for your organization on August 17, 2018 and communicate the dates. The automatic update would take place during your normal maintenance window.

The implications should be clear, and it certainly seems that, in this scenario, Microsoft has decided to eliminate any degree of upgrade flexibility for its customers.

No Changes to Minor/Major Updates?

Again, if you are familiar with how D365CE Online operates, there are two flavours of updates:

  • Minor updates, to address bugs, performance and stability issues, are continually pushed out “behind the scenes”. You have no control over when and how these are applied, but they will always be carried out outside your regions regular business hours. The Office 365 Administrator Portal is your go-to place to view any past or upcoming minor updates.
  • Major updates generally referred to as Spring Wave or Fall Update releases. There has always been two of these each year, and administrators can choose when to apply these to a D365CE instance. These updates can generally take much longer to complete but will introduce significant new features.

Microsoft’s new Update Policy seems to leave this convention intact, with a noteworthy change highlighted below in bold:

We are transforming how we do service updates for Dynamics 365 (online). We will deliver two major releases per year – April and October – offering new capabilities and functionality. These updates will be backward compatible so your apps and customizations will continue to work post update. New features with major, disruptive changes to the user experience are off by default. This means administrators will be able to first test before enabling these features for their organization.

In addition to the two major updates, we will continue to deploy regular performance and reliability improvement updates throughout the year. We are phasing deployments over several weeks following safe deployment practices and monitoring updates closely for any issues.

Some additional detail around this will be welcome to determine its effectiveness, but I can imagine some parity with the Experimental Features area in PowerApps, which – contrary to the above – will often introduce new features that are left on by default. A derived version of this feature would, I think, work in practice and hopefully streamline the process of testing new functionality without necessarily introducing it unintended into Production environments.

On-Premise Implications

One question that all of this may raise is around the on-premise version of the application, in particular for those who consume online subscriptions, but use their dual-usage rights to create an on-premise instance instead. This situation becomes more pressing when you consider the following excerpt from the refreshed Update Policy:

Dynamics 365 (Online) version 8.2 will be fully supported until January 31, 2019. Customers running version 8.2 should plan to update to the latest version prior to this date.

Now, the important thing to stress is the fact that the above quotation makes explicit reference to Online as opposed to on-premise. Also, when we check Microsoft’s product lifecycle page, you can see that Mainstream support for this product ends in January 2021. On-premise administrators can, I would suggest, breath a sigh of relief for now, but I would urge you to contact Microsoft to clarify your support arrangements. I think as an organisation as well, you should also start seriously asking yourself the following questions:

  • Is an online, Software as a Service (SaaS) version of the application going to be easier to maintain compared with dedicated server environment(s)?
  • Is it possible to achieve all of your required functionality and business requirements using the Online version of the application?
  • Do you want to ensure you have the latest features exposed to you and can take advantage of Online-only functionality, such as Export to Excel Online?

If the answer to all of the above questions is “Yes”, then a migration to the Online version of the application would be my recommended course of action, as it wouldn’t surprise me if Microsoft were to stop releasing new versions/service packs for the on-premise version of the product or eliminate it by providing inexpensive sandbox instance options.

Recommended Next Steps

The fundamental aim of this move is a housekeeping exercise for Microsoft. The announcement earlier this year of version 2 of the Common Data Service – which is utilising the existing D365CE SQL database for all customisations – is the key driver behind a lot of the changes that are happing in the CRM/D365CE space today. The focus for the product team at Microsoft currently appears to be towards knitting together both experiences into the PowerApps interface. What this means in practice is that the traditional customisation experience is going to slowly fade away, to be replaced by Model-Driven App development instead. This refresh is excellent for several reasons – it provides a much-needed interface update, while also exposing additional functionality to us when creating business applications – but it is evident that such a massive change will require a consistent playing field for all of Microsoft’s existing version 8.2 and below D365CE customers. Getting everyone onto version 9 of the application is the apparent result towards rolling out version 2 of the Common Data Service for all existing customers while ensuring that D365CE can fit into the mould of other application release cycles across Microsoft today. Embracing the change should not be a difficult thing to do and, when you understand the broader context, there is no other option available on the table.

So what are the key takeaways from this that you should be thinking about in the weeks and months ahead? My suggested list would include the following:

  • Schedule your update to version 9 of the application manually well in advance of August 16th 2018. DO NOT put yourself in a position where you are having an update forced upon you and give yourself the amount of time needed to successfully plan and test your upgrade in good time before January 31st 2019. I would also anticipate upgrade slots may start to fill up fast if you want to wait until as late as possible too 🙂
  • Start considering your future strategy in regards to the on-premise version of the application, if you are still supporting these environments. I speak with literally zero authority here, but I would not be surprised if the on-premise version of the application receives no further update at all in future or that dual-usage rights get revoked entirely.
  • Get familiar with the Common Data Service and Power Apps, as this is increasingly going to be the go-to area D365CE development and administration in the future. If you get the opportunity to attend one of Microsoft’s PowerApp in Day course, then be sure to go along without any hesitation. I would also be happy to speak to and help anyone with training in this area.
  • As with anything in life, embrace change, be proactive and identify areas of opportunity from this. A good one from my perspective is the potential to more easily introduce the staggering array of differing Business Application functionality, with the outcome being the ability to quickly deploy bespoke business applications that achieve any possible requirement and integrate with a wide variety of different services or datasets.

This is an accompanying blog post to my YouTube video Dynamics 365 Customer Engagement Deep Dive: Creating a Basic Plug-in, the second in a series aiming to provide tutorials on how to accomplish developer focused tasks within Dynamics 365 Customer Engagement. You can watch the video in full below:

Below you will find links to access some of the resources discussed as part of the video and to further reading topics:

PowerPoint Presentation (click here to download)

Full Code Sample

using System;
using System.Globalization;

using Microsoft.Xrm.Sdk;

namespace D365.SamplePlugin
{
    public class PreContactCreate_FormatNameValues : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            //Obtain the execution context from the service provider.

            IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

            //Extract the tracing service for use in debugging sandboxed plug-ins

            ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            tracingService.Trace("Tracing implemented successfully!");

            if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)

            {
                Entity contact = (Entity)context.InputParameters["Target"];

                string firstName = contact.GetAttributeValue<string>("firstname");
                string lastName = contact.GetAttributeValue<string>("lastname");

                TextInfo culture = new CultureInfo("en-GB", false).TextInfo;

                if (firstName != null)
                {

                    tracingService.Trace("First Name Before Value = " + firstName);
                    contact["firstname"] = culture.ToTitleCase(firstName.ToLower());
                    tracingService.Trace("First Name After Value = " + contact.GetAttributeValue<string>("firstname"));

                }

                else

                {
                    tracingService.Trace("No value was provided for First Name field, skipping...");
                }

                if (lastName != null)

                {
                    tracingService.Trace("Last Name Before Value = " + lastName);
                    contact["lastname"] = culture.ToTitleCase(lastName.ToLower());
                    tracingService.Trace("Last Name After Value = " + contact.GetAttributeValue<string>("lastname"));
                }

                else

                {
                    tracingService.Trace("No value was provided for Last Name field, skipping...");
                }

                tracingService.Trace("PreContactCreate_FormatNameValues plugin execution complete.");

            }
        }
    }
}

Download/Resource Links

Visual Studio 2017 Community Edition

Setup a free 30 day trial of Dynamics 365 Customer Engagement

C# Guide (Microsoft Docs)

Source Code Management Solutions

Further Reading

MSDN – Plug-in development

MSDN – Supported messages and entities for plug-ins

MSDN – Sample: Create a basic plug-in

MSDN – Debug a plug-in

I’ve written a number of blog posts around plug-ins previously, so here’s the obligatory plug section 🙂 :

Interested in learning more about JScript Form function development in Dynamics 365 Customer Engagement? Then check out my previous post for my video and notes on the subject. I hope you find these videos useful and do let me know if you have any comments or suggestions for future video content.

This is an accompanying blog post to my YouTube video Dynamics 365 Customer Engagement Deep Dive: Creating a Basic Jscript Form Function, the first in a series that aims to provide tutorials on how to accomplish developer focused tasks within Dynamics 365 Customer Engagement. You can watch the video in full below:

Below you will find links to access some of the resources discussed as part of the video and to further reading topics.

PowerPoint Presentation (click here to download)

Full Code Sample

function changeAddressLabels() {

    //Get the control for the composite address field and then set the label to the correct, Anglicised form. Each line requires the current control name for 'getControl' and then the updated label name for 'setLabel'

    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line1").setLabel("Address 1");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line2").setLabel("Address 2");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line3").setLabel("Address 3");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_city").setLabel("Town");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_stateorprovince").setLabel("County");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_postalcode").setLabel("Postal Code");
    Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_country").setLabel("Country");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line1"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line1").setLabel("Address 1");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line2"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line2").setLabel("Address 2");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line3"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_line3").setLabel("Address 3");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_city"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_city").setLabel("Town");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_stateorprovince"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_stateorprovince").setLabel("County");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_postalcode"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_postalcode").setLabel("Postal Code");

    if (Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_country"))
        Xrm.Page.getControl("address2_composite_compositionLinkControl_address2_country").setLabel("Country");
}

Download/Resource Links

Visual Studio 2017 Community Edition

Setup a free 30 day trial of Dynamics 365 Customer Engagement

W3 Schools JavaScript Tutorials

Source Code Management Solutions

Further Reading

MSDN – Use JavaScript with Microsoft Dynamics 365

MSDN – Use the Xrm.Page. object model

MSDN – Xrm.Page.ui control object

MSDN – Overview of Web Resources

Debugging custom JavaScript code in CRM using browser developer tools (steps are for Dynamics CRM 2016, but still apply for Dynamics 365 Customer Engagement)

Have any thoughts or comments on the video? I would love to hear from you! I’m also keen to hear any ideas for future video content as well. Let me know by leaving a comment below or in the video above.

With 2018 now very firmly upon us, it’s time again to see what’s new in the world of Dynamics 365 certification. Nothing much has changed this time around, but there are a few noteworthy updates to be aware if you are keen to keep your certifications as up to date as possible. Here’s my round-up of what’s new – let me know in the comments if you think I have missed anything out.

MCSE Business Applications 2018

The introduction of a dedicated Microsoft Certified Solutions Architect (MCSA) and Microsoft Certified Business Applications (MCSE) certification track for Dynamics 365 was a positive step in highlighting the importance of Dynamics 365 alongside other core Microsoft products. Under the new system, those wishing to maintain a “good standing” MCSE will need to re-certify each year with a brand new exam to keep their certification current for the year ahead. Those who obtained their MCSE last year will now notice on their certificate planner the opportunity to attain the 2018 version of the competency via the passing of a single exam. For Dynamics 365 Customer Engagement focused professionals, assuming you only passed either the Sales or Customer Service exam last year, passing the other exam should be all that is required to recertify – unless you fancy your chances trying some of the new exams described below.

New MCSE Exams

Regardless of what boat you are relating to the Business Applications MCSE, those looking to obtain to 2018 variant of the certification can expect to see two additional exams available that will count towards the necessary award requirements:

The exams above currently only appear on the US Microsoft Learning website but expect them to appear globally within the next few weeks/months.

MB2-877 represents an interesting landmark in Microsoft’s journey towards integrating FieldOne as part of Dynamics CRM/Dynamics 365 Customer Engagement, with it arguably indicating the ultimate fruition of this journey. To pass the exam,  you are going to have to have a good grasp of the various entities involved as part of the field service app, as well as a thorough understanding of the mobile application itself. As is typically the case when it comes to Dynamics 365 certification, the Dynamics Learning Portal (DLP) is going to be your destination for preparatory learning resources for the exam; along with a good play around with the application itself within a testing environment. If you have access to the DLP, it is highly recommended you complete the following courses at your own pace before attempting the exam:

Dynamics 365 for Retail is a fairly new addition to the “family” and one which – admittedly – I have very little experience with. It’s rather speedy promotion to exam level status I, therefore, find somewhat surprising. This is emphasised further by the fact that there are no dedicated exams for other, similar applications to Field Service, such as Portals. Similar to MB2-877, preparation for MB6-897 will need to be directed primarily through DLP, with the following recommended courses for preparation:

Exam Preparation Tips

I’ve done several blog posts in the past where I discuss Dynamics CRM/Dynamics 365 exams, offering help to those who may be looking to achieve a passing grade. Rather than repeat myself (or risk breaking any non-disclosure agreements), I’d invite you to cast your eyes over these and (I hope!) that they prove useful in some way as part of your preparation:

If you have got an exam scheduled in, then good luck and make sure you study! 🙂

Working in-depth amidst the Sales entities (e.g. Product, Price List, Quote etc.) within Dynamics CRM/Dynamics 365 Customer Engagement (CRM/D365CE) can produce some unexpected complications. What you may think is simple to achieve on the outset, based on how other entities work within the system, often leads you in a completely different direction. A good rule of thumb is that any overtly complex customisations to these entities will mean having to get down and dirty with C#, VB.Net or even JScript. For example, we’ve seen previously on the blog how, with a bit of a developer expertise, it is possible to overhaul the entire pricing engine within the application to satisfy specific business requirements. There is no way in which this can be modified directly through the application interface, which can lead to CRM deployments that make imaginative and complicated utilisation of features such as Workflows, Business Rules and other native features. Whilst there is nothing wrong with this approach per-say, the end result is often implementations that look messy when viewed cold and which become increasingly difficult to maintain in the long term. As always, there is a balance to be found, and any approach which makes prudent use of both application features and bespoke code is arguably the most desirous end goal for achieving certain business requirements within CRM/D365CE.

To prove my point around Sales entity “oddities”, a good illustration can be found when it comes to working with relationship field mappings and Product records. The most desirable feature at the disposal of CRM customisers is the ability to configure automated field mapping between Entities that have a one-to-many (1:N) relationship between them. What this means, in simple terms, is that when you create a many (N) record from the parent entity (1), you can automatically copy the field values to a matching field on the related entity. This can help to save data entry time when qualifying a Lead to an Opportunity, as all the important field data you need to continue working on the record will be there ready on the newly created Opportunity record. Field mappings can be configured from the 1:N relationship setting window, via the Mappings button:

There are a few caveats to bear in mind – you can only map across fields that have the same underlying data type and you cannot map multiple source fields to the same target (it should be obvious why this is 🙂 ) – but on the whole, this is a handy application feature that those who are more accustomed to CRM development should always bear in the mind when working with CRM/D365CE.

Field mappings are, as indicated, a standard feature within CRM/D365CE – but when you inspect the field relationships between the Product and Quote Product entity, there is no option to configure mappings at all:

Upon closer inspection, many of the relationships between the Product entity and others involved as part of the sales order process are missing the ability to configure field mappings. So, for example, if you have a requirement to map across the value of the Description entity to a newly created Quote Product record, you would have to look at implementing a custom plugin to achieve your requirements. The main benefit of this route is that we have relatively unrestricted access to the record data we need as part of a plugin execution session and – in addition – we can piggyback onto the record creation process to add on our required field “in-flight” – i.e. whilst the record is being created. The code for achieving all of this is as follows:

using System;

using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;

namespace D365.BlogDemoAssets.Plugins
{
    public class PreQuoteProductCreate_GetProductAttributeValues : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            //Obtain the execution context from the service provider.

            IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

            //Get a reference to the Organization service.

            IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = factory.CreateOrganizationService(context.UserId);

            //Extract the tracing service for use in debugging sandboxed plug-ins

            ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            tracingService.Trace("Tracing implemented successfully!");

            if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)

            {
                Entity qp = (Entity)context.InputParameters["Target"];

                //Only execute for non-write in Quote Product records

                EntityReference product = qp.GetAttributeValue<EntityReference>("productid");

                if (product != null)

                {

                    Entity p = RetrieveProductID(service, product.Id);
                    string desc = p.GetAttributeValue<string>("description");
                    tracingService.Trace("Product Description = " + desc);
                    qp.Attributes["description"] = desc;

                }

                else

                {
                    tracingService.Trace("Quote Product with record ID " + qp.GetAttributeValue<Guid>("quotedetailid").ToString() + " does not have an associated Product record, cancelling plugin execution.");
                    return;
                }
            }
        }

        public Entity RetrieveProductID(IOrganizationService service, Guid productID)
        {
            ColumnSet cs = new ColumnSet("description"); //Additional fields can be specified using a comma seperated list

            //Retrieve matching record

            return service.Retrieve("product", productID, cs);
        }
    }
}

They key thing to remember when registering your Plugin via the Plugin Registration Tool (steps which regular readers of the blog should have a good awareness of) is to ensure that the Event Pipeline Stage of Execution is set to Pre-operation. From there, the world is your oyster – you could look at returning additional fields from the Product entity to update on your Quote Product record or you could even look at utilising the same plugin for the Order Product and Invoice Product entities (both of these entities also have Description field, so the above code should work on these entities as well).

It’s a real shame that Field Mappings are not available to streamline the population of record data from the Product entity; or the fact that there is no way to utilise features such as Workflows to give you an alternate way of achieving the requirement exemplified in this post. This scenario is another good reason why you should always strive to be a Dynamics 365 Swiss Army Knife, ensuring that you have a good awareness of periphery technology areas that can aid you greatly in mapping business requirements to CRM/D365CE.