What’s new in CRM 2016 and why you should read the preview guide

We keep moving forward, opening new doors, and doing new things, because we’re curious and curiosity keeps leading us down new paths.

Walt Disney


I go on holiday to Butlins for a week and Microsoft release a new version of CRM, well not actually release but an outline of what’s coming in CRM 2016 and the CRM community is vibrating with blogs, articles and general excitement of a new release.

There is a difference between theoretical knowledge and practical knowledge (a concept I talked about in this blog Why CRM Developers should always start with the CRM SDK), in a similar way there is a difference between functionality in the CRM 2016 preview guide and the functionality included in CRM 2016.

Working with Microsoft Dynamics CRM we must keep our eyes on the horizon scanning for new versions of CRM getting read to land

What is CRM 2016 preview

The preview document gives you a guide to the new features likely to be included in CRM 2016 but the features and functionality described in the preview document can be

  • Amended
  • Removed
  • New features added
  • Deprioritized

At this late stage it’s unlikely the functionality will change much but be aware functionality can change

New releases of Microsoft Dynamics CRM are exciting

  • There is always a new look and feel to CRM
  • Great new functionality for Sales men (like dashboards etc)
  • Useful new functionality for Developers
  • A bunch of Gotcha’s and limitations

The preview guide gives us a glimpse of the future, a road sign to help us anticipate the impact CRM 2016 will make.

The features might change but at least we have an idea of the new functionality and importantly what technologies or products are going to be used to deliver the new functionality.

Why you should read the CRM 2016 preview guide

The Scouts motto is be prepared, the handbook describes this in more detail

  • Be Prepared in Mind by having disciplined yourself to be obedient to every order, and also by having thought out beforehand any accident or situation that might occur, so that you know the right thing to do at the right moment, and are willing to do it.

The Scout’s had some good values because it’s not the first time I have used their advice.

Why you should write code and customizations like a boy scout

Being prepared allows you to survive but knowing the future functionality in CRM 2016 allows you to use this as an opportunity to take advantage by aligning your technical skills to the technology used to deliver the new functionality.

If you know what’s coming, you can position yourself to take advantage of it

Reading the preview guide you can see what functionality is coming, allowing you to prepare your skills and knowledge, enabling you to position yourself to start utilizing the new functionality.

Sometimes CRM developers can feel like Microsoft are constantly adding new features and not giving developers/consultants/solution architects time to get used to new functionality.

The reasons for reading the CRM preview guide are the same reasons CRM developers should read the What’s new for developers in the CRM SDK.

  • Knowledge
  • Start to prepare
  • Analyse the suitability of customizations for existing CRM projects
  • be prepared (Scouts motto)

There are some additional reasons you should  the CRM 2016 release notes

  • It’s not very long
  • you get an idea of what’s coming
  • a chance to see if anything exciting is coming
  • You can start to prepare
  • it’s decent CRM network conversation
  • Adjust your learning to focus on technology used in CRM 2016 (mobile, Azure Machine Learning, etc)

CRM Online customers

One aspect of CRM Online I found concerning from a CRM developers perspective is the process of updating the CRM version.  When ever a patch, service update or new CRM version is released the CRM customizations could stop working and you need to test ALL the customizations.

Testing all the customizations for complex projects can be take a lot of resources (people) and organising, so it’s important you are in control of this process.

Microsoft addressed this by allowing users to turn off the automatic updates but I’m not sure what happens for a new release or if you can turn off the updates indefinitely?

This technet article discussing managing CRM online updates (you have to approve the update)

Manage Microsoft Dynamics CRM Online updates

The document states updates are mandatory but you can have only one update per year

this update becomes mandatory and the customer will be required to take the update during the available dates for that particular release.


The thought of a CRM instance having to update to a new version causes my CRM developer heart beat to start racing.  Imagine if this happened to all the Microsoft Dynamic CRM projects I have worked on, this is another great reason for CRM developers not to write unsupported code

On the positive side this should make plenty of work for CRM developers, whilst they check their customizations work in the new release of CRM 2016.

CRM is constantly evolving

I view new release of Microsoft Dynamics CRM with excitement and In trepidation

It’s a wonderful world. You can’t go backwards. You’re always moving forward. It’s the wonderful part about life. And that’s terrific.

Harvey Fierstein



A CRM Developers life and CRM surroundings are constantly changing with major new releases coming once a year (new release or service pack update I classify as major release)

It’s exciting and sometimes tiring trying to keep up with change inside Microsoft Dynamics CRM.

CRM developers have new functionality to learn and master, CRM developers are constantly challenged.

CRM developers/CRM professionals need to work hard to keep up with the latest releases and functionality but with this difficultly comes opportunity.

With every new release of Microsoft Dynamics CRM you have the opportunity to become an expert in the new functionality, the go to person.

A key skill of the CRM developer is knowing what customization to use for a particularly customer requirement.  Microsoft Dynamics CRM is extremely versatile and required functionality can be achieved using different customizations but there is usually one type of customization which is ideally suited.

CRM developers know the different  versions of the CRM SDK and always start by referring to it

Key Information for the CRM 2016 Preview

The key information about the CRM 2016 preview can be found below

Release Guide link

Microsoft Dynamics CRM 2016 release guide

Microsoft Blog links

Microsoft reinvents productivity with upcoming release of customer engagement solution

Bob Stutz blog post

Microsoft Dynamics CRM 2016 – Delivering the Next Generation of Intelligent Customer Engagement

Release Date

Microsoft Dynamics CRM 2016 — in Q4 of this calendar year.  I find it amusing Microsoft can release CRM 2016 in the year 2015!

Microsoft Video Link

Microsoft Dynamics CRM 2016 Release Overview

Grand Quotes

I thought I would put some of the quotes, I love the idea of releasing quotes like this when I have created some code for a bugfix, maybe something like

“With this bug fix I have designed the code from the ground up to deliver the core functionality in one bug fix, which eliminates distractions and should dramatically increase customer productivity.  I have made field read only.”

Over exciting quotes from Bob Stutz and Microsoft

“We are eliminating the distractions people inevitably encounter when they bounce from application to application in the course of doing their job by taking away the need to export or switch applications, and by automating fundamental tasks.”


“Dynamics CRM 2016 is designed from the ground up to deliver core capabilities all in a single system to eliminate distractions, to make it easier to get things done, and to dramatically increase productivity so our customers can spend more time serving their customers.”


One quote from Microsoft press release

“The most comprehensive upgrade ever for Dynamics CRM includes advancements in intelligence, mobility and service, with significant productivity enhancements to help businesses and workers achieve more”


The direction of CRM 2016

Before looking at the functionality I want to highlight the broad direction of Microsoft Dynamics.

Microsoft have a clear hierarchy in platforms 

Cloud first, mobile second, on premise last

Microsoft’s policy of updating CRM on premise versions 6 months later definitely seems Microsoft’s way of gently persuading everyone to use the CRM online version.  I have talked about this before

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

This seems a strange tactic because there are lots of reasons (data, complexity) why some CRM solutions are better suited to CRM On Premise.  Microsoft recently announced their Cloud certification to allow CRM on premise solutions to move to private cloud/Azure platform, which I blogged about here.

I’m don’t understand why Microsoft are making their current CRM on premise customer wait six months when you consider these are likely to be larger deployments.  I don’t understand the 6 month delay at all, it’s confusing to customer, developers, everyone and isn’t going to persuade anyone to move from On Premise to CRM online????

Machine Learning

Machine learning sounds really interesting and using customers data to make recommendations and suggestions would be awesome.

Social CRM

Social CRM is moving from listening to interacting and integrating with the customers CRM data.


Microsoft are continuing to slowly to properly integrate their companies and products they purchased.  Parature integration is looking to bring in the powerful knowledge base functionality into CRM (whilst also Microsoft are creating their own knowledge base functionality!!!).

I find the slow rate of integration a bit puzzling, Microsoft purchased Parature ages ago.

CRM 2016 Hosk Notes

Here are my thoughts on the CRM 2016 preview guide, this is a developers eye view.

Below are my brief notes on the CRM 2016 preview guide


  • CRM App for Outlook
  • Excel templates
  • Delve

Microsoft as a company seem to be focusing on improving productivity of office workers.  This involves integrating Microsoft’s differences products\services and the increased use of machine intelligence.


  • Cortana Analytics suite and machine learning
  • Intelligence product suggestions
  • recommend cases
  • Machine Learning

Personally I’m not interested in Cortana, I don’t want to talk to my computer or CRM but Microsoft keeps working at it, integrating into more applications so I am probably going to need to get used to it.

The machine intelligence is one area I find really interesting.  I view it as CRM using the customers data to help, recommend similar cases or knowledge articles for the case your are working on.  Intelligent product suggestion based on your selected choices.

I imagine it working in a similar way to Amazon using your viewing history and purchasing history to recommend other products.  If Microsoft can add this type of functionality into CRM then it would be fantastic.

I currently have no idea how Azure Machine learning works and my mind boggles at how you would set it up??


  • Offline capabilities
  • Task based mobile apps
  • Cortana

The mobile app is slowly getting better but my question to Microsoft is why is it taking so long?  This is almost 3 years of development on the mobile app now.  Progress is being made, offline capabilities for mobile apps are always good and Task based might make it more useful in some circumstances.

Unified Service

  • Field Service (a company/product Microsoft purchased last year)
  • Parature knowledge management (meant to be very good)
  • Native Knowledge management

Integration between the purchased products continues slowly


  • SMS Marketing – {shudder}, I don’t think I have ever received a welcome SMS message.
  • Email – view Generated HTML

HTML emails are great, SMS marketing is a bad concept (no one likes receiving text messages, its like a pop up for phones)

Interesting stuff from a CRM developers perspective

  • Bulk Data Loader for CRM online
  • a new cloud service to bulk import/export data in Dynamics CRM online.
  • support for reoccuring data import/export
  • Modern Web API – OData v4

There isn’t a great deal for developers to get excited about but the developer tweaks are not usually mentioned in the preview guide (they look at high level functionality and new features).

The new OData v4 will be awesome

The bulk loader sounds interesting because a lot of projects use Scribe to insert data and this could potentially avoid that cost.  The bulk loader can also doing regularly/reoccurring imports and exports


  • Excel templates
  • Excel What if analysis

Excel is good because most people are comfortable with it, it’s easy to use and people can open it up and try it.  Most companies have an excel license so it doesn’t cost.

The new templates will work by opening an excel document and merging it with a template, which means it should be quick

Document generation – pre defined templates

  • A merge between an instant document and templates.
  • Document templates are role based
  • Work for Word and Excel.

This sound like a great idea.

External Party Access

An API to allow third parties (customers, partners) to access CRM data.  You model the access inside CRM.

Wow, sharing CRM data for third parties.  The question I have is how would the licensing work for this?  How will this fit in the current 2000 different licences you can currently use.


  • Can view IFrames!
  • Disable copy and paste to stop data leakage
  • Enforce Encrpytion
  • offline

Some good features added here

Social CRM

  • Interact with customers
  • Publish tweets and facebook posts

The move from Social listening to social interaction makes the social CRM functionality really start to work.

Social  CRM is or will be a key area in customer support and the ability to respond to social media events in cases will become increasingly important.

I will be interested to see how the preview differs from what is actually implemented.

Quote from the preview guide

In addition to Twitter, Facebook, Blogs (WordPress/Tumblr), Videos (YouTube) and News, you will now be able to search boards/forums and custom sources via RSS. This includes internal non-public sources, like Yammer

Guided User Experience

This will probably be very useful to new users but I can already imagine it’s going to be really annoying to experienced users as CRM keeps popping up with advice and guidance (go away you damn paperclip)

Azure Machine Learning

  • Product Cross Sell recommendations
  • Suggested Knowledge based articles

Further reading

don’t forget CRM 2015 rollup

Just because everyone is talking about CRM 2016, don’t forget there has been a patch for CRM 2015

Get Ready for update CRM 2015 1.1


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

will all CRM instances be online is the future?

Why haven’t I worked on more CRM online projects?

I was contemplating the questions above reading the white paper about creating solutions for CRM online

Microsoft Dynamics CRM Online patterns & principles for solution builders

It’s a white paper highlighting the limitations of CRM online and how Solutions architects will need create solutions to work with the strengths of CRM online and work around the weaknesses.

Is CRM Online the future of Microsoft Dynamics CRM?

Microsoft would like to think CRM projects are all heading online, Microsoft is spending lots of money creating data centres , bringing their top software offerings to the cloud(Exchange, Sharepoint, Dynamics CRM, Azure, Office, etc etc etc).  Making it easy for all the software to work together on-line (e.g. removing barriers)

Microsoft acquired online products to extend Microsoft Dynamics CRM

  • Parature
  • Social Engagement
  • MDM – Marketing

From a cost point of view (looking at it holistically), it seems sensible use massive data centres which are maintained and look after, rather than individual companies having to host servers, hire skilled people to maintain them.

Hosk experience of CRM online

So far I have only been involved in small/simple projects successfully working with CRM online.

The majority of projects I have worked on and have known about have been with CRM On premise.  I wonder if I have worked on complex CRM projects because I am a CRM developer, it’s perhaps more likely the projects I work on will involve complex customizations and with the previous versions of Microsoft Dynamics were better suited to CRM on premise.

I have heard of projects moving from CRM online back to CRM on Premise but no projects moving from CRM On premise to CRM online.

CRM online is growing?

Microsoft Dynamics CRM online is growing in popularity.  I say it but I couldn’t find much information to back that up

Good Momentum For Microsoft Dynamics CRM Reported At Their Fall Analyst Event

The Dynamics product is doing well. The numbers speak for themselves: 12% revenue growth in FY13; Dynamics AX and CRM growing by double digits worldwide and 30% in the Americas and Asia; and CRM Online growing by 80% in FY13, with two out of every three new customers opting for cloud. Microsoft Dynamics has 359,000 customers and 5 million users, while Microsoft Dynamics CRM has 40,000 customers and 3.5 million users.

The post is a few years old but I’m going to going to assume Microsoft Dynamics CRM online is growing.  I will assume Microsoft will actively continue to grow the Microsoft CRM online offering, which will result in more CRM online projects for CRM Developers to work on.

It’s easy to envisage a future where companies pay for virtual cloud servers and services instead of paying for skilled IT guys to look after their own servers.

At the moment my personal view is big CRM projects and complex CRM projects are not a good fit for CRM online.

Limitations of CRM online

Below are some of the limitation of CRM online


A lot of CRM projects I have worked on have involved SQL indexing.  I understand indexes are not automatically added because when indexes need to be added it has to be in a specific area which needs a performance improvement.

How does indexing work with CRM online?  how do you find out where the SQL server is running slowly?

The white paper says you can get Microsoft engineers to look at indexes through a support request but I wonder how this works and how effective it is?

Increasing performance – How?

CRM on premise infrastructure is designed to allow more resources to be added in a modular way.  e.g. if you need more performance in the SQL server, you can add more SQL servers.  If you need better performance on the CRM front end, you add more CRM front end servers.

How does this get managed on line?

Data privacy

Some companies don’t want to their data in the cloud no matter how secure Microsoft says it’s is.

Sandboxed plugins

Sandboxed plugins can’t access any 3rd party dll’s, which can be quite limiting

Custom ASP.NET pages

Custom ASP.NET pages can’t be done in CRM online, so no iFrames showing custom pages.

Reports are FetchXML

CRM online reports can only be written in FetchXML because CRM developers have no direct access to the CRM database.

Size of database

Online database charge by the gigabyte.  CRM databases can grow pretty quickly but how do you shrink POA table if gets to big.

The emphasis will be on CRM support engineers to reduce the POA table size but the Microsoft as a company do not benefit from this (because they charge by the GB), so there is conflicting goals.

Reading the document has made me aware of techniques to move data out of the CRM database into services like SharePoint (or similar) but database management could be a full time job.  The alternative of course is there will be so much space available in the future where database size is not an issue.

The current relationship between megabytes and gigabytes could be the same relationship between gigabytes and terabytes in the future and the talk about database size seem silly.

Hosk Thoughts

if Microsoft keep investing in the Online infrastructure and products and more companies use CRM online then I will inevitably get increased exposure to CRM online.

I view CRM Online similar to CRM mobile in the fact it’s the direction the industry is moving but currently this seems to be a slow process and I expect the majority of CRM project to be CRM on premise.

I’m not sure why Microsoft are delaying service updates to CRM on premise?  It’s going to make CRM developers and resellers life increasingly complex and frustrating, delayed enhancements don’t seem appearing enough to change peoples suitability or desire for CRM version.

In my experience big or complex CRM projects are more suited to On Premise solutions and it would be extremely difficult to do these projects online with CRM onlines current limitations.

If Microsoft changed the online version to host servers online and the CRM developers could access the servers then it would be a very compelling argument, a half on line/on premise solution.

Understanding how CRM Online solutions can work

Reading the paper for the first time, I felt it was unusually worded because it highlighted a lot of limitations but portrayed them as benefits

Microsoft Dynamics CRM Online patterns & principles for solution builders

This line jumped out at me

Everybody has felt a little guilty when they wrote some bad code in the past. Well, in Microsoft Dynamics CRM Online, the temptation to write icky code has been removed in a lot of places, especially where it comes to resource utilization.

Thinking about the document it raises some good points because Solution architects will need to design different solutions for CRM Online than they would if their were designing a CRM solution for a CRM on premise.

Developers don’t like being limited but if more CRM Solutions and customizations will be in deployed in the cloud it’s knowledge CRM developers will need to have.  Part of a CRM Developers work practise is to adapt to new versions of CRM and CRM online is a different version to CRM On Premise.

The part of the document I found worrying is the areas it mentions lack of resources which might be available to you.

My experience with CRM performance issues has involved a lot of investigation around infrastructure (networks, resources, etc), SQL database performance (query performance, adding indexes).  Code optimization and database locking investigation.  I will give an honourable mention to the POA table and security configuration as potential causes of poor performance.

Considering the above any investigation would rely heavily on Microsoft support engineers, this is must be a potential concern for any organizations considering large CRM projects online.

These two quotes from the document, which discuss the potential downside of CRM online

no portion of these shared resources are dedicated strictly to the instance running your solution – they’re shared. That means that you must design your solution to accommodate potential scenarios where these resources don’t perform your requests immediately.

Also, be aware that while there are no strict limits on the amount of workflow jobs you can send to the queue, if you or any of your neighbors sharing the resource are using an inordinate amount of resources, you may have a governor placed on your usage

Hard limits with CRM online

Plug-ins 2 minute timeout
SQL 30 second timeout for database transactions
Running workflow jobs Fair use – no specific hard limits, but the resource is balanced across organizations
Direct database access Not allowed

Where the document is really useful is it focuses on how you should construct CRM Online solutions to utilize the strengths of the CRM online offering.

If you have large long running processes then you can create services in Azure to do this work and take the heavy work load, nicely avoiding hitting any of the hard limits set in a CRM Online solution.

I have no experience of CRM Online using Azure so it was interesting to read the methods to  deploy code as

Azure Iaas

Deploy code to IIS in the cloud running in a virtual machine (VM).  The same as hosting a webservice on your own server or usually in a new web application on a CRM server.

Azure PaaS

I’m not quite sure how this works, it seems you don’t configure IIS but just deploy your code and deploy it as a cloud service.  This seems to be more like a windows service (but in the cloud).  The code needs to be written in a certain way to be run a cloud service.

Configuration over code

Microsoft in recent versions of CRM have been steadily improving the no code solutions with improvements giving improved functionality to mobile devices and more customization choice for CRM Online

Code                  GUI Customizations

Javascript     –     Business Rules

Plugins         –      Real time workflows

Managing Storage

CRM online charges by the Gigabyte/per month fee.  CRM Developers need to manage the CRM database size by storing information in other cloud services such as Sharepoint online and azure storage (Microsoft naturally recommend their own products).

The conclusion of white paper

Creating solutions for the cloud is different. It requires thinking about the system architecture in a different way. But making this leap is an imperative for almost anybody selling business or government solutions today. Keeping up with the market requires us to make the necessary adjustments, and allows us to embrace the attendant benefits of building solutions for the cloud.

Initially I thought highlighting the limitations of CRM online was an odd thing to do.  Looking at the document again it’s seems like a good idea because it’s important CRM Developers know the limitations.

Offering advice and techniques to work around these limitations shows you what is possible.  The white paper points to techniques, software and services CRM developers will need to become more familiar with in the future with CRM on line projects continuing to increase in size and complexity.

The increased complexity of CRM online solutions will need developers to create CRM customizations using no code tools such as business rules and real time workflows in conjuction with code deployed and running in Azure services.

This may explain the raft of new synchronization enhancements added into CRM 2015 SP 1, which I talked about in the blog post below

What’s new in CRM 2015 SP1 for developers, customizers and admins

The white paper won me round in the end, highlighting ways around some of the major limitations with CRM online.

Many CRM Developers will have no experience of deploying code in azure and consuming it within CRM.  I would say not just CRM developers but many CRM resellers won’t have experience of creating solutions using code deployed in azure.

This were my thoughts on CRM online, please leave your thoughts, experiences in the comments

CRM 2013 – Let XRM.Utility.OpenEntityForm open CRM forms for you

I wrote a blog post about creating a creating a new record with Javascript and then opening this new record by dynamically creating a url and then some problems I had with that and whilst reading about my trials and tribulations with JavaScript and bugs,  Brian Bayes sat me down (virtually), gave me a cup a tea and said “Hosk, stop all this hurrying and scurrying around, creating dynamic urls, why don’t you just use my good buddy Xrm.Utility.openEntityForm to do all that tricky stuff” and then gave me one simple line to do the method I had written.

Brian didn’t actually use those words but left me  a comment in linkedin saying this function would have have help but that wouldn’t have been as amusing.

So I looked into Brian’s suggetion and by gum he was right.


Initially I thought it was only available in CRM 2013 but they snuck it in during CRM 2011 rollup 8, which shows you the benefit of reading what useful things are in the rollups.



You can also pass in parameters you want to set on the form

var parameters = {};
parameters["formid"] = "b053a39a-041a-4356-acef-ddf00182762b";
parameters["name"] = "Test";
parameters["telephone1"] = "(425) 555-1234";
Xrm.Utility.openEntityForm("account", null, parameters);

The Xrm.Utility object provides a container for useful functions not directly related to the current page. This object was added in Microsoft Dynamics CRM 2011 Update Rollup 8.

var newWindow = Xrm.Utility.openEntityForm("contact");
  • e helped you here?47m ago
  • Ben HoskingBen Hosking Everyday is a school day. Although the project I was working on was CRM 2011 so I’m not sure that would have worked.44m ago

  • Brian BayesBrian Bayes Ah I see, Xrm.Utility has been tucked away since CRM 2011 Rollup 8 and I only discovered it a couple of months ago to be honest.32m ago

  • Ben HoskingBen Hosking knowing that would have saved me at least an hour mucking about with the bug and getting the url correct. Great comment, cheers.

CRM 2013 Plugin – Step by Step guide for a Post Account Create Plugin using the Developer Toolkit

In the I have created a video if you want to watch me go through the process of creating the plugin. Before I start with this plugin tutorial, to understand it you will need to have gone through my previous tutorials I have three CRM videos and two blog posts

Setting up Developer Toolkit for Microsoft Dynamics CRM

blog – Setting up visual studio with the developer toolkit

video – CRM 2013 – Create a simple plugin in CRM 2013 using the CRM Development Toolkit 

blog – CRM 2013 – simple update plugin

CRM 2013 – Simple Plugin – Redeploying, improving and updating

So I will assume you have got CRM development toolkit setup and ready to rock, so now we can just focus on creating a new plugin to run on the create of an account record In this plugin we are going to create a plugin which is triggered when a new account is created.

Here is a video going through the steps

below features the steps and the code

The plugin will fire after the new account is created so it will be a post plugin message.

The plugin will then create a follow up task with a due date in two weeks time.

Open up your Visual Studio project.

Go to the CRM Explorer

click on Account right click and choose Create Plug-in

Create Account Plugin


For the Create Plugin Details, Account is already set but you want to

change Message to Create

Pipeline stage to Post-Operation

Create Account Plugin 1


This will Create a file called PostAccountCreate.cs  For this plugin I have split up the default plugin code and the code which does the creating of the task.


// <copyright file="PostAccountCreate.cs" company="Microsoft">
// Copyright (c) 2014 All Rights Reserved
// </copyright>
// <author>Microsoft</author>
// <date>4/26/2014 10:42:26 PM</date>
// <summary>Implements the PostAccountCreate Plugin.</summary>
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// </auto-generated>
namespace HoskCRMDev2013.Plugins
 using System;
 using System.ServiceModel;
 using HoskCRMDev2013.Plugins.Plugin_Code;
 using Microsoft.Xrm.Sdk;

 /// <summary>
 /// PostAccountCreate Plugin.
 /// </summary>
 public class PostAccountCreate: Plugin
 /// <summary>
 /// Initializes a new instance of the <see cref="PostAccountCreate"/> class.
 /// </summary>
 public PostAccountCreate()
 : base(typeof(PostAccountCreate))
 base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, "Create", "account", new Action<LocalPluginContext>(ExecutePostAccountCreate)));

 // Note : you can register for more events here if this plugin is not specific to an individual entity and message combination.
 // You may also need to update your RegisterFile.crmregister plug-in registration file to reflect any change.

 /// <summary>
 /// Executes the plug-in.
 /// </summary>
 /// <param name="localContext">The <see cref="LocalPluginContext"/> which contains the
 /// <see cref="IPluginExecutionContext"/>,
 /// <see cref="IOrganizationService"/>
 /// and <see cref="ITracingService"/>
 /// </param>
 /// <remarks>
 /// For improved performance, Microsoft Dynamics CRM caches plug-in instances.
 /// The plug-in's Execute method should be written to be stateless as the constructor
 /// is not called for every invocation of the plug-in. Also, multiple system threads
 /// could execute the plug-in at the same time. All per invocation state information
 /// is stored in the context. This means that you should not use global variables in plug-ins.
 /// </remarks>
 protected void ExecutePostAccountCreate(LocalPluginContext localContext)
 if (localContext == null)
 throw new ArgumentNullException("localContext");

 // TODO: Implement your custom Plug-in business logic.
 // Obtain the execution context from the service provider.
 IPluginExecutionContext context = localContext.PluginExecutionContext;
 IOrganizationService service = localContext.OrganizationService;

 // The InputParameters collection contains all the data passed in the message request.
 if (context.InputParameters.Contains("Target") &&
 context.InputParameters["Target"] is Entity)
 // Obtain the target entity from the input parmameters.
 Entity entity = (Entity)context.InputParameters["Target"];
 if (entity.LogicalName == "account")
 if (context.MessageName.ToUpper() == "CREATE")

 AccountCreateFollowUp accountCreateFollowUp = new AccountCreateFollowUp();
 accountCreateFollowUp.CreateAccountTask(service, entity);


The code above checks to see if the entity is of type account and if the message is a CREATE message. This is in case you had the same plugin being fired on lots of different account messages (e.g. create, update, status change).  We aren’t really using it in this plugin but I thought it would be interesting to mention it.

The code which creates the task is called here

AccountCreateFollowUp accountCreateFollowUp = new AccountCreateFollowUp();
accountCreateFollowUp.CreateAccountTask(service, entity);

Below you can see the class which creates the followup task

using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;

namespace HoskCRMDev2013.Plugins.Plugin_Code
 public class AccountCreateFollowUp
 /// <summary>
 /// Code to create account task for new accounts
 /// </summary>
 /// <param name="service">crm service</param>
 /// <param name="accountEntity">entity of the newly created account</param>
 public void CreateAccountTask(IOrganizationService service, Entity accountEntity)

 //create new task for account set in 2 weeks in the future
 Entity contactAccountTask = new Entity("task");
 contactAccountTask["subject"] = "Check new account is happy";
 contactAccountTask["description"] =
 "Make contact with new customer. See if they are happy with service and resolve any issues.";
 contactAccountTask["scheduledstart"] = DateTime.Now.AddDays(14);
 contactAccountTask["scheduledend"] = DateTime.Now.AddDays(14);
 EntityReference entRef = new EntityReference("account", accountEntity.Id);
 contactAccountTask["regardingobjectid"] = entRef;

 // Create the task and this should be linked to the new account record


 catch (FaultException ex)
 throw new InvalidPluginExecutionException("An error occurred in the plug-in.", ex);



Now right click on CRMPackage

click build

Click Deploy


CRM 2013 – Exporting your changes in a solution from your CRM 2013 trial

I have had my CRM 2013 trial for a month and those of you who jumped on board on Hosk’s CRM Dev youtube channel will also have also created a CRM 2013 trial which will be expiring soon.  It would be nice if Microsoft could just give me a CRM 2013 organisation to use, particuarly as I mainly use it answer Forum questions and to test CRM and write blogs on CRM 2013 functionality.  Still I’m sure there are a lot of people who would like that but I like everyone else have to create a new CRM 2013 trial every time my current ones runs out days

Here is the video, where I run through the steps of exporting your solution


Usually Microsoft send you some emails saying your trial is ending soon, you better act quick because all your data and changes will soon be deleted, unless you give Microsoft some money and sign up for a minimum 5 user monthly license and a years contract (I think these details are correct)

The good news is you can just create another trial and in the past my CRM 2013 Trial was still accessible up to 60 days later but it might become accessible any time after 30 days, so we need to act now to save our customization’s from being sucked away.

 Visual Studio

You code components are usually safe from the trail ending.  The reason they are safe is because they will probably be offline in your CRM 2013 Developer toolkit, so you have an offline backup of these file and the ability to import them into a new solution.

The plugins in a solution are an interesting limbo point because in solutions plugins are compiled DLL’s, which is great for moving between CRM organisation, if you want to change those plugins you will need the class files and the code logic (although I do appreciate you can decompile dll’s, its not something you want to be doing often).  So you do need to keep track of your Visual studio CRM 2013 Developer solutions and projects.

Exporting your solution

Open your solution in CRM and make sure you have all the components you have changed or want to take to your new CRM 2013 Trial

Click on components and this will show you all the components that are currently in your solution

solution export 1

anything you don’t want select and click the remove button.

There may be things you have edited in the default solution, if you want those then you need to click the add existing component and select that component.


When  you are happy click the Export Solution button.

It will ask you to publish customizations, if you have changes saved but not published you should publish those changes because you cannot export any save but not published changes.

click next

now you will see a list of dependent components, these are components that must exist in the target system to work and the reason for this is because they are referenced in the components in your solution.  An example is Contact is a required component in my solution because there is a contact lookup on the account called Primary Contact.

solution export 2


In my example I know all these required components will exist in my next CRM system because they are all default components but if you may need to add some custom ones if you had added them and they don’t exist in your current solution.

Press Next

It asks you if you want to bring the system settings with you?  This depends if you have changed any

Press Next

You now have to choose managed and unmanaged.  If you are not sure export both solutions (it means you will have to run the export wizard again).

I view managed and unmanaged as

managed = Read Only

Unmanaged = Editable

if you export a managed solution it means you won’t be able to modify that code on the target CRM organisation.  This is usually for a customer release.

In my example I want an unmanaged solution because I want to be able to edit and change the components in the next CRM instance I import them into.



If you have changed the data in your CRM system and want to bring it with you to the next CRM organisation then  you need to do an advanced find, select the records you want and then export those records into Excel.

Don’t tick the allow for remimport button we want to import this data into a new CRM organisation so there is no point getting the guids because they won’t exist in my new CRM trial.


Backing up

It’s a good idea to back up your Solutions as Managed and unmanaged.  I would advise you to keep a backup of all the solutions you create, particularly changes in version format.  Solutions provide a great way to backup custmoziation and allow you to quickly import component changes without having to import new/old data


So now you have an export of your changes in a solution ready to import into your next CRM 2013 trial, where you can continue to learn about CRM Development and try the new CRM 2013 features.



CRM 2013 – MB2-703 – Customization and Configuration Certification Solution Test Questions

The best way to prepare for an exam, is to take practice questions and test your knowledge with questions in a similar way the exam will.

I have created a YouTube video where I go through the questions and explain the answers, I would definitely recommend watching that for the first time at least


So with this in mind I have created some questions for you.

I have also created the questions as slides, which you have seen in the video

Multiple choice questions


Quickfire Yes/No Questions





  1. Which statements are true about solutions?
    1. Saving your changes in a solution is mandatory
    2. It’s possible to export the Default Solution
    3. You cannot create more than 50 solutions
    4. Publisher is a mandatory field on a solution
  2. Which components can be added to a solution
    1. Team
    2. Message
    3. Business Rule
    4. Business Unit
  3. Which components cannot be added to a solution
    1. Subject
    2. Service Endpoint
    3. Goal
    4. Site Map
  4. What is true about solutions
    1. Deleting an unmanaged solutions doesn’t delete the components if there is data for them.
    2. Deleting a managed solutions deletes the components and the data
    3. You can only export the default solution as an unmanaged solution
    4. You can add plug-in assembly to a solution
  5. What is development and not customization or configuration from the list below
    1. Create a plug-in to run on the creation of an account to set reference number
    2. Create a custom entity to hold venue information
    3. Javascript validation on a phone number field
    4. Creating a business rule to disable a field until another field has a value
  6. What is removed when you delete an unmanaged solution in CRM 2013
    1. Just the solution record
    2. The solution record, the components and all the data
    3. The solution record and the components
    4. The solution record, it’s components and dependant components.
  7. What does the Version number show
    1. major.build.minor.revision
    2. major.revision.build.minor
    3. major.minor.revision.build
    4. major.minor.build.revision
  8. you import a managed solution which contains the account entity, you then import an unmanaged solution which also contains the account entity, both solutions change the Account Number field to have a different name, what name is on the account form
    1. Account Number, you cannot change the name of the account number
    2. The name given to Account number in the managed solution
    3. The name given to the Account Number in the unmanaged solution
    4. The name given in the solution which was imported last
  9. Which of the below is true
    1. You cannot export the Default Solution
    2. You can export the Default Solution from CRM OnPremise to CRM Online
    3. You need a special security privilege to import solutions
    4. Unmanaged solutions have to be published
  10. What is false about managed solutions
    1. Managed solutions can only be changed or altered by the publisher
    2. importing a managed solution is automatically published
    3. Managed solutions have versioning, unmanaged solutions do not.
    4. managed solutions are additive, you cannot remove any components by importing a managed solution





  1. b,d
  2. b,c
  3. a,c
  4. b,c,d
  5. A,C
  6. A
  7. D
  8. D
  9. C, D
  10. C




  1. Can you export a managed solution
  2. Can you export an unmanaged solution
  3. Can customization and configuration be used and refer to the same components.
  4. The correct format for version is major.minor.revision.build
  5. Subjects can be added to a solution
  6. There is no limit to the number of solutions you can create
  7. The prefix in the publisher is added before schema name for entities, fields
  8. The changes to components when importing an unmanaged solution cannot be undone
  9. Queues can be added to solutions
  10. managed properties are customizable by default
  11. It’s not possible to export  an unmanaged solution
  12. managed solution must be published after importing


  1. false
  2. true
  3. true
  4. false
  5. false
  6. true
  7. true
  8. true
  9. false
  10. true
  11. false
  12. false




Hosk’s Top CRM 2013 articles of the week 11th April 2014

Here are my friday CRM articles of the week, there have been some great Developers articles this week

but let us start as always with a celebrity thumbs up

Article of the week

As I am a “computer” person various members of my family have been asking me whether they need to change their passwords because of heartbleed

The simple answer is Yes, just do it.  Google and Facebook could have been compromised.  Interestly the banks (UK), amazon and linkedin all seem ok.  The biggest danger is you have probably used the same password all over the place, so if an account is important to you, go change that password.  You should check that the site has updated their code/certificate to patch up the security flaw, otherwise you will have to change the password again later.  Most of the big internet companies have changed their certificate.

This article on the BBC is pretty good
also this page

an in depth article


this site has a bit more clear data

“This is not the first defect of its kind and it certainly won’t be the last, but it is one of the more serious faults we’ve seen in recent internet history,” said Mr Lyne.

Name Vulnerable? Patched? Change password?



No need

Only if shared with vulnerable service

Amazon Web Services





Not clear

Not clear

Not clear




Only if shared with vulnerable service



No need

Only if shared with vulnerable service



No need

Only if shared with vulnerable service











No need

Only if shared with vulnerable service

If This Then That



Will force users to log out and ask them to update



No need

Only if shared with vulnerable service



No need




No need

Only if shared with vulnerable service



No need

Only if shared with vulnerable service



No need

Only if shared with vulnerable service



No need

Only if shared with vulnerable service







No need

Only if shared with vulnerable service

Yahoo/Yahoo Mail




CRM Article of the Week

Here is the CRM article of the week

This article/slideshow was tweeted by Jukka Niiranen and is a fantastic resource for any CRM Developers (like those who are subscribed to Hosk’s CRM Dev)

Developer Tips and Tricks by Marc Schweigert

Is basically a roundup of lots of great sites, great tips and best practices on all areas of CRM development, 33 slides of action packed CRM Developer goodness


CRM 2013 Articles


DEV Articles

Jukka Niiranen has not only been writing great CRM articles but also tweeting some very useful ones as well.  This article has a video and shows you how to debug your Javascript in Visual Studio

EUREKA: F5 debugging of CRM JavaScript web resources

The linked article from the above but this is amazing, you can debug Web Resources without deploying them by using a Scott Durow trick of using Fiddler 2. AWESOME

Debugging CRM web resources without ever deploying them

It’s not a blog but a youtube video, to whom someone described as the infamous CRM blogger Leon Tribe.  This video in the words of Leon Tribe is “making the world a better place”.  This is a good article for CRM Developers to consider

TFS for Microsoft Dynamics CRM Development Management

I was asked this question on the Hosk CRM Dev linkedin group and then rather marvelously the questioner found the answer and shared it with everyone

Install CRM Developer Tookit in Visual Studio 2013 

Well I couldn’t put articles of the week in without including some of mine surely.  I did another video featuring CRM plugins, I updated the previous weeks example and go into a bit more about plugin theory.  Join Hosk’s CRM Dev channel NOW

CRM 2013 Video – simple update plugin, Redeploying, improving and updating


Blog – CRM 2013 – Plugins – Simple update plugin – Redeploying, improving and updating

The blog post for the first Plugin video, a good step by step guide to developing a CRM

CRM 2013 – Step by Step Update Plugin Tutorial using the CRM 2013 Development Toolkit


How to connect and authenticate to Office 365 and CRM 2013

MS CRM 2013 Online upgrade to Office 365 authentication

The tip of the quick Dev tip shows how to refresh your web resources with code

Refreshing the Web Resource in CRM 2013

Microsoft like to call it PBL – Portable Business logic, everyone else calls them Business Rules

 Hiding a Tab in Dynamics CRM using Portable Business Logic (PBL)


CRM 2013 Articles

Jukka Niiranen who has 657 followers on google plus and no wonder he writes brilliant blog posts using his special CRM MVP powers, here he shows us how to report on the sneaky CRM system entities of Case Resolution and Opportunity closed.

Accessing “Special” Activity Data with CRM Report Wizard

Did you know there are a bunch of Business Process Flows inside CRM just waiting to be turned on? You do now

 How to Turn On Ready-to-Use Business Process Flows in Dynamics CRM 2013

There are three new server roles and services

Dynamics MS CRM 2013 – New Server Roles and Services

Joel Lindstrom the CRM MVP answering Hosk’s questions this week

CRM MVP Question and Answer – Joel Lindstrom

Be careful when you check some options on entities because like taking the Red pill in the matrix you can never go back

Tip #110: Don’t prematurely check the boxes

Common Queries Microsoft Support answer about CRM Async service, it’s a cheeky look under the covers

Common queries regarding Dynamics CRM Asynchronous Service

A Hosk blog reader asked me some questions about starting a CRM blog, my advise was do it, you will learn a bunch of stuff about CRM and you might help other people who want to know about CRM.  So she did and here is her first CRM blog, well done  Elaiza

I’m a CRM tourist, I need a tour guide!