CRM 2013 – Why wasn’t an updated Custom workflow used by CRM?

You must be the change you wish to see in the world.

A custom workflow was published, but CRM continued to use the old custom workflow.  This error frustrated the developer for a while before diagnosing the problem.

CRM developers must understand the CRM architecture and CRM SDK, the alternative is fixing problems using trial and error.

trial-and-error method of find solutions is a lottery, sometimes you find the solution quickly, other times you try many alternatives.

The CRM SDK is a map showing boundaries and location of major CRM SDK landmarks.  Developers navigate the CRM landscape creating suitable customizations for customer requirements.  CRM developers who don’t consult the CRM SDK (map) can get lost and not know how to get back on course.

The Problem

A CRM developer updated a Custom workflow, published the custom workflow, but the old custom workflow was still running.

Experienced CRM developers will nod their head at this rite of passage.

The quick answer

Recycling the CRM app pool refreshed the custom workflow, doing an IISRESET resolve the problem.

Be careful recycling the CRM app pool or doing an IISRESET on production systems, it will disrupt users sessions.  IISRESETS and CRM app pool recycle should be done out of hours where possible.

The reason this worked is the custom workflow had changed the parameters passed in.

Detailed explanation

Thinking is the hardest work there is, which is probably the reason why so few engage in it.

Learning how the CRM works, helps diagnose future problems and avoid making similar mistakes.  The CRM developer centre is a great resource to help navigate the CRM SDK.

CRM developers benefit from learning the CRM SDK and CRM Developers should always start with the CRM SDK, understanding how it works and its quirks.

The better you understand how CRM works the fewer error/mistakes and dead ends you will make.  Dead ends can waste time because

  • Create a customization
  • find it doesn’t work
  • Remove customization
  • Have to create another customization

CRM is the framework sitting on top of languages JavaScript and .NET,  you need to learn CRM as well the programming languages.  This explains why .NET developers struggle with CRM development

Custom workflows and developer fear

CRM developers can fear custom workflows if they have never created one.  Custom workflows share many characteristics of plugins but have some fundamental differences.

One of the main differences is how the Custom Workflow variables are passed in but the key difference is plugins must run within 2 minutes or the plugin times out, throws an error and rolls back any changes.

Custom workflows are often used for long running process.

Here is an example of linking a dialog and a custom workflow

The blog below is common Custom Workflow question

CRM 2013 – How to get guid of initiating record in CustomWorkflow

Before you have created a customization, there is a doubt you can successfully create the customization.  The developer often has theoretical knowledge but not the practical experience.

The best method to remove this developer fear is to do it, it’s often not as difficult as your mind tells you it MIGHT be.

Why didn’t the Custom Workflow seem to publish

I remember this topic from a previous blog post

A Custom workflow is Asynchronous, running after the plugin execution pipeline has finished.  Async processes (System Jobs) are managed by the Async Queue Manager which decides what System job runs next.

The Async processes can never guarantee when they will run because the Async Queue manager decides what is run. It could be 3 seconds or it could be 2 days (unlikely but possible).

Microsoft have a great page – Asynchronous service in Microsoft Dynamics CRM, all CRM developers should be made to read this.

To refresh my knowledge on Async plugins blog posts

Async process are

  • Async plugins
  • Custom Workflows
  • Workflows
  • Bulk Delete jobs
  • System Jobs
  • Bulk Import

The CRM Asynchronous Service runs on the CRM server services (it could be on the back end server)

Recycling the app pool/doing an IISRESET resolved the problem but why?.  I looked towards the effects of IISRESET’s on plugins.

If you deploy plugins to the CRM database you should not need to restart the CRM async services or do an IISRESET.

To understand the effects of an IISREST read this post and the section What can you restart and how does it affect plugins.

In my example, I needed to to recycle the app pool/IISRESET, I found the answer article

Do we really need IIS Reset and Async Services restart when we deploy plug-in or custom workflow – CRM 2011

There is one other scenario when you need to recycle the CrmAppPool application pool. If you modify the parameters that are available for a Custom Workflow Activity, then CRM will not make any new parameters available when editing the workflow until after recycling the application pool.

I think the reason the custom workflow wasn’t updating was because the parameter values might have changed.

Interesting facts on Custom Workflows

A great article on using versioning your Plugins and Custom Workflows

assembly versioning

If you use versioning you will need to select the new version because both versions will now be deployed.

Some best practices/gotcha here – Asynchronous service in Microsoft Dynamics CRM

You should stop the asynchronous service before you unregister a plug-in that was registered to execute asynchronously. Stopping the service prevents a situation where an asynchronous registered plug-in has been queued for execution but for which there is no plug-in assembly currently registered. For example, consider the situation in which a plug-in has been registered to execute asynchronously and the related event has fired. After the asynchronous operation has been queued by the queue manager, you then unregister (delete) the plug-in assembly from the Microsoft Dynamics CRM database. In this case, an error occurs when the asynchronous service tries to execute the queued asynchronous operation but the plug-in assembly no longer exists.


How to create realistic Test Data for your CRM Project and why you should

True happiness comes from the joy of deeds well done, the zest of creating things new.

Poor quality and inconsistent data in your CRM database = bugs and odd behaviour out of CRM customizations and CRM demo’s – Hosk

Test data which doesn’t replicate live data in your CRM environment can cause bugs and create havoc in demo’s but few CRM developers or companies have realistic dummy data available to import.

Have you been in these situations

Whilst showing new functionality, unexplained errors disrupt the demo


Setting up a new CRM environment, finding the process is bottle necked by bad data (which always takes longer than you think to import and get right)

Create good data once and import many times

Being able to import dummy data into different CRM organisations and different CRM projects is a valuable resource, making it worth the effort to create your dummy data files.

Useful  and reusable data is contacts, accounts, tasks, phone calls, emails, Address, Text

Developers and Data

All CRM systems need data to use it. without data your beautiful CRM solution is like a car without petrol, it won’t do anything. – Hosk

CRM developers don’t like dealing with data requirements for a project (because it’s a task which isn’t coding).

Getting your data in a format which can be imported into a CRM organisation is great because often during CRM projects you will need to setup and move data between lots of different CRM environments e.g.

  • Dev
  • Test
  • Customer Test
  • Pre-Production
  • Production

Characteristics of good CRM project are well structured, organised and all aspects are planned and prepared.  Data preparation and importing between environments should be easy with minimal effort required by the developers.

Avoid data technical debt by ensuring data files are kept up to date and stored in source control, all developers should no the location and the steps to import the data.  Don’t burden one developer with importing the data, it’s not pleasurable for the developer and the project can become dependent on the developer, which can cause problems.

On a chaotic CRM project the data import/export process will be ad hoc, not defined and a confusing and time consuming process, prone to missing chunks of data.

The time spent on creating and updating the data to move between CRM organisations is time well spent.  In the long term it will make a unpopular tasks manageable and will save you time (particular with bugs caused by bad data)

Importing data is simple

Microsoft Dynamics CRM comes with an easy to use Data Import Wizard for import small to medium amounts of data.  Below is a guide how to use the Data import wizard.

CRM 2013 – Importing users using the Data Import Wizard

The data import wizard is a great tool for importing small amounts of data quickly.   The data enrich functionality when used with the advanced find is a great way to bulk edit

  • Select records
  • Update records (could be a non CRM user)
  • Import and update those records

The enrichment process is explained in my blog post Why the advanced find is a CRM Developers best friend.

CRM 2016 may has some new functionality called  the Bulk Data loader, which might offer an alternative for importing data. You can read about the new CRM 2016 features in the blog post – What’s new in CRM 2016 and why you should read the preview guide

Sample data in CRM

Microsoft includes sample data and you can add and remove it by going into

Settings –> Data Management — Sample Data

sample data

Click on the Sample data you can install\uninstall the data.

Step by step instructions can be found here

Adding and Removing Sample Data in Dynamics CRM 2013

before you can import data you need to create some.

Why create realistic dummy data?

Good data in CRM database can help find bugs, bad data can help create bugs – Hosk

Setting up environments and data importing are often unpopular jobs for CRM developers (Developers favourite activity is coding and any other activities get in the way!)

In most projects you will need to create accounts, contacts and maybe some records.  Consider it’s likely you will need to set-up lots of different environments so you want to get on top of your data requirements.

What is developer/test data?

If I use the term bad data I am referring to what I call developer data.  Developer data is data created by developers or testers which doesn’t accurately replicate the data created in production or the data which will exist in the production environment.

You could create lots of data with Test e.g Test1, Test2, Test3, perhaps with a number counter appended.  The problems I have found with poor test data

  • Not testing your customization’s with realistic data, can delay finding bugs until you hit the live system with real data
  • Test data can make understanding and using the system confusing
  • It can give a bad impression to the customer (similar to the broken window theory)
  • Bad data can cause bugs
  • Good data can find bugs

Realistic data or random data can help find bugs in your system.  Developers will put simple data into a system (usually as fast as they can), this allows bugs to not found.  This is one cause of bugs being uncovered in the live system, when real data is imported into the system you can find errors appearing

  • The code doesn’t like comma’s, hyphens or quotes
  • length or size errors
  • null errors
  • unexpected types of data

Data imported into a CRM organisation stretches, pushes and pulls the system to see if it brakes.

Why do developers create developer data

Developers do not and often don’t need to know how the end users will use a feature.  In many situations developers will be given a technical specification document with a list of required features to implement.  A developer will learn enough about the customization to create it but will lack the detailed knowledge of the business analyst who captured the requirements and wrote the functional specification.

If a developer isn’t clear how the functionality will be used it’s difficult for the developer to put in realistic data, instead developers input data in the correct format (e.g. string, number).

A developers goal when developing is to test the code navigates through the various paths of code, read my blog post to learn more about this – Don’t just test the happy path

  • Happy path (when it works)
  • Alternative path (other routes through the code/customization)
  • Exception path (when things go wrong)

The developers goal is to put in as small amount of data to be able to test the different code/customization paths.

The unrealistic data used by developers and developers use of System Administrator security role highlight why companies should test functionality with testers in a different CRM environment from the developers CRM environment.

Don’t let bugs get into production environments

Benefits of realistic data

The benefits of creating realistic dummy data is the ability to import data into your existing CRM project and future projects.

  • Contacts and Account data are reusable
  • You do the effort once, reap the rewards of your efforts many times over
  • Customer safe data ready to important
  • Save time and effort creating the data for every project
  • Ease of use

I found contact data import data I created for a project using the the website Mockaroo.  I got the files and imported them into my test system, first go without problems.

boom 500 contacts with realistic names, phone numbers and email addresses which imported straight into CRM.

Make sure you import the data and fix all the errors.

Good data should import with out errors.

Tools to create Test data

I have found three websites to create test data, please leave other good sites in the comments.  I looked at free websites to create the data

Database Test Data

A basic website with an easy to use interface.   It’s not as complex as the other two does have a lot of useful functions.  The biggest plus for this site is there is no limit on records created.

  • Auto-increment
  • Username
  • Create words, sentences and paragraphs
  • Email, Phone Number, Address
  • DataTime, Date, Time

link – Database Test Data


  • Easy and quick to use
  • Export file in JSON, CSV, XML
  • No Limit on data exported
  • You can save recipe (columns and data structure)


  • 3 export choices
  • Smaller choice of columns


Url – Mockaroo

Mockaroo is a great site with a lot of functionality to create common columns in data import.  The preview function is handy.  The is a limit of 1000 rows of data unless you would like to sign up for a data plan which starts at $50 dollars a year.

Mockaroo organises the fields you can add into various section, the location field creation functionality has the options below


The IT has useful fields

Mockaroo 2

Mockaroo 3


  • Easy to use
  • Export file in CSV, JSON, SQL, and Excel formats.
  • You can save recipe (columns and data structure)


  • Limit to 1000 rows


Generatedata offers some excellent functionality to create complex fields based on custom lists of data.

The main problem with GenerateData is it limits the export to 100 rows unless you donate.

Below shows an example of contact export I did, you can see fields using custom lists

Prospect Standard – Gold, Silver, Bronze.

Generate Data


  • Easy to use
  • can create complex data
  • lots of export types


  • Limit to 100 rows

Summary of tools

Database test data is great for creating a lots of data but is limited to basic contact, account type of data.

GenerateData is great but the limit of 100 rows means you are only likely to use it for data with lots of complex fields.

Mockaroo sits nicely between the two websites above, it has complexity and 1000 rows is decent size.

Don’t forget you can run the tools many times to generate more data.

You can always do some Excel manipulation to create extra fields and use the exported data as the core.

CRM 2013 – What is the WRPC Token and resolving INVALID_WRPC_TOKEN errors

Program testing can be used to show the presence of bugs, but never to show their absence!


I was tasked with load testing Microsoft Dynamics CRM 2013 and I quickly ran into some problems getting INVALID_WRPC_TOKEN error

Performance Testing

We tried to use Telerik for performance testing but this ended in failure because we couldn’t get the encoded guids from the responses.

So I am now trying Visual Studio Web Performance and Load tests, which you need Visual studio 2013 Ultimate or Visual studio 2015 Enterprise editions.

Visual studio – Web Performance and Load Test Project

token error 0

I won’t go into performance testing in this post but focus on the pesky token error.  Please take into account when I do mention performance testing I might get things completely wrong, this is because I’m learning about it, using the tried and tested way of trying it and making lots of mistakes (feel free to correct me in the comments)

How did I get the error

When you do performance testing you go through this process

  1. you click start recording
  2. this brings up an Internet Explorer browser
  3. Run through the process you want to test
  4. Stop recording

This captures all the HTTP traffic (looks like a fiddler trace).  If you haven’t used Fiddler I would recommend these two links to get started

When I ran the test of my recording I got an INVALID_WRPC_TOKEN error

token error

Which leads me to the question, what is an WRPC token?

What is a WRPC token

The first place to start the search should be the CRM SDK – Why CRM Developers should always start with the CRM SDK

It took quite a lot of searching but I finally got to this page

Key management in Microsoft Dynamics CRM

Microsoft Dynamics CRM uses two kinds of private encryption keys for deployments accessed over the Internet:

Web remote procedure call (WRPC) token key. This key is used to generate a security token, which helps make sure that the request originated from the user who made the request. This security token decreases the likelihood of certain attacks, such as a cross-site request forgery (one-click) attack.


The WRPC key’s purpose is to stop people using programs to send requests to CRM and trick it into return data.

The WRPC token is embedded into each request.  You maybe thinking once you work out the token you can use it every time time.

Back to the Microsoft page Key management in Microsoft Dynamics CRM for another quote

Key Regeneration and renewal

CRM ticket keys are automatically generated and renewed and then distributed, or deployed, to all computers running Microsoft Dynamics CRM or running a specific Microsoft Dynamics CRM Server 2013 role. These keys are regenerated periodically and, in turn, replace the previous keys. By default, key regeneration occurs every 24 hours.


I have bolded the key part, key regeneration occurs every 24 hours.  This is great for stopping bad people making naughty requests but it’s not so good for my load testing script which has the WRPC token embedded into it’s recording.

Other WRPC Token errors

Whilst I was searching for information about the WRPC token I found a few more errors I have listed below

An old CRM 4 error by the awesome David Jennaway, who sadly never writes about CRM on his blog any more, he used to be an awesome source of CRM developer information.  The first link is a discussion about it.

INVALID_WRPC_TOKEN: Validate WRPC Token: WRPCTokenState=Invalid, TOKEN_EXPIRY=4320, IGNORE_TOKEN=False, MS CRM 2011

It seems you can get a token error if you open CRM in two different browsers!

Access denied error on closing of Appointment in CRM 2011

The blog was getting an error when they changed to HTTPS binding.

INVALID_WRPC_TOKEN at associating records thru CRM 2011 UI

Unexpected error while bulk edit

Work around for token errors

The only workaround I have found with regards to WRPC token is to disable the token being used.

I found the answer on this blog page

You can add a registry key which will disable the CRM token check.

On the CRM Server, open REGEDIT

Go to


Create a DWORD registry key with the name IgnoreTokenCheck

Set the value to 1

Restart IIS or Recycle App pool


As with a lot of workaround this does mean your CRM is more open to cross site scripting attacks.

I wouldn’t recommend this for a production environment, unless it’s only a short term fix.

Back to my Web performance testing

I disable the check and my recordings were working without error.

Talking about Performance testing, Microsoft have released the CRM Peformance Toolkit for CRM 2015 but which is compatible with CRM 2013 (for free)

CRM-Performance-Toolkit for CRM 2013/CRM2015 is released

The tests will test all default entities and will provide a good starting point for creating your own tests.

Hopefully these tests will provide a way to get the WRPC token and save it as a parameter because turning off the WRPC token will only work for on premise CRM organisation because you cannot turn off this setting for CRM Online (you don’t have access to the server).

Hopefully with a bit of digging around I can work out how Microsoft have got round this WRPC token problem I was experiencing.



Hosk’s Top CRM Articles of the week – 28th September

I have been de-cluttering my stuff the last week, unsurprisingly I have too much stuff, which makes it difficult to tidy it all the way.

This book is amazing, it has changed me from a messy person to a tidy person who now folds his pants and socks! because as the author says “folding is fun”

The Life-Changing Magic of Tidying: A simple, effective way to banish clutter forever

The two key points which have changed the way I view tidying.  You are not deciding what to throw out but what to keep.  If an object doesn’t give you joy then get rid of it.

“Keep only those things that speak to your heart. Then take the plunge and discard all the rest. By doing this, you can reset your life and embark on a new lifestyle.”
― Marie Kondo, The Life-Changing Magic of Tidying Up: The Japanese Art of Decluttering and Organizing


The other key concept is once you have decluttered, everything has it’s place.  All of your items should have a distinct place and you put an item back in it’s designated place.

Buy the book, it’s awesome and if you click the link from this page I will get 5 pence or some huge amount :-).  I will be buying some for Christmas presents

Quote of the week

Knowledge alone is static. Know-how is knowledge in motion – Gold rule of software engineering

Joshua Levy

Article the week

Understanding the Microsoft Dynamics CRM Performance Center

Microsoft have added an awesome tool to show you the performance of your CRM forms but then it seems to get hardly mentioned.

The Cobalt blog is the best explanation of how it works I have read.

The most important bit which I keep forgetting, how to get the form up

Hit Control+Shift+Q to open the Performance Center window

Dynamics CRM performance troubleshooting

Good blog with lots of tips on finding performance issues

 Best of the Rest

CRM Web API Preview – Generate Strongly Typed Objects from Metadata Document

Great blog post on using the new Web API preview to create strongly typed objects and I personally loved strongly typed objects

What happens when you publish a duplication rule

have you ever wondered, me neither but someone has.

Online proctored Microsoft certification exams are now available

You can do your CRM exams in your pants in the comfort of your own home, beware they will use your laptop webcam to check your are not cheating.

CRM 2015 – Advanced find to return all enabled users with a security role

A Hosk blog talking about advanced finds

A list of CRM blogs you should be following

A small list of great CRM blogs you should be following

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

Hosk’s looks at the CRM 2016 preview

Getting Cortana to Work on Australian Windows Phones

It’s good to see people putting Cortana to work

Microsoft Dynamics CRM 2013 White Papers & Technical Documentation

A great list of all the CRM 2013 white papers

CRM 2011 – How to set up a lookup using Javascript

How to set a lookup using JavaScript

Storing the “Last Activity” on a Microsoft Dynamics CRM record

Good blog to show you how to store the last activity, who needs machine learning

CRM 2011 shortcuts

CRM has lots of shortcuts, who knew

CRM Plugins – Stopping infinite loops and understanding PluginExecutionContext.Depth

How to stop infinite loops in your plugins, it’s all about the depth

How to get the server time in Dynamics CRM?

You never know when you need to get the server time, it’s like hammer time but better

Great list of CRM version numbers, Release Dates, Build Numbers, and Collateral 

It’s hard to remember build numbers, so luckily someone has collated them all in one list for you

how to Manage Microsoft Dynamics CRM Online updates

A great article from Microsoft about managing updates, you can turn them off to have one a year.

CRM 2015 – Why filtered views are useful

Filtered views are more awesome than you know

New Forms Authentication in ADFS 3.0 and IFD for Dynamics CRM


Lookup Field vs Option Sets in Dynamics CRM

Which is better, when should you use a lookup field?

MobileCRM: A different mindset in projects

great article on how to approach mobile CRM projects

Entity Image updater tool

It’s a tool to update entity image


he Golden Rule of Software Engineering

code reviews


Sleep May Be One of Our Most Powerful ‘Antibiotics’

Tires, coffee and people

Tim Ferris Morning Rituals podcast

How Do Excellent Performers Differ from the Average?

a dozen things I’ve learned from charlie munger about mistakes

tips on Writing Funny by Scott Adams

Keeping Things Simple and Tuning out Folly

Solitude and Leadership

What Two Teenagers Learned From Watching Every Best Picture Oscar Winner

Previous top picks

Hosk’s Top CRM Articles of the week – 21st September

Useful Hosk Links

Hosk list Of CRM 2013 Tools

A list and review of CRM 2013 tools, this will probably work in CRM 2015 as well

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

MB2-703 – CRM 2013 Customization and Configuration Certification Information

All the CRM 2013 content to help you pass the exam

HoskWisdom – Hosk Developer Quotes

 Words of Wisdom from the Hosk.  I have written over 900 articles, surely I should have said a few memorable things

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


CRM 2015 – Advanced find to return all enabled users with a security role

I had a requirement to find all the users who had a security role because I needed to update a value.

Advanced find is easy to find

I am a big fan of the advanced find and have been known to have many open at the same time

Why the advanced find is a CRM Developers best friend

In CRM 2013 Microsoft made it difficult to find the Advanced (Why Microsoft why?).  I often had to think how to find the advanced find which is a big no no in UX design (Good CRM design should not make users think)

The bad treatment of the advanced find caused one CRM developer to create a solution which added the advanced find to every record

CRM 2013 Tool – Advanced Find on record forms for CRM 2013

Security Priviledges

If you have users who don’t have security roles you will see this (annoying) message

Advanced find users with security roles 1

The common reason for the message above is due to users being added and not yet given any security roles, which is usually because someone forget or they are being lazy

Other reasons for users having no security roles is moving users between business units.  When you move a user between business units it removes all the security roles.

Sometimes CRM admins can take away user roles from a user rather than disabling them.  The user won’t be able to do anything.   Remember a users security privileges can come from Team membership, not only their individual security roles.

If you want to learn more about users and security roles, read this brilliant article from CRM MVP Adam Vero

Security Roles and Teams in CRM – An Inconvenient Half-Truth

For a brief overview of security roles and business units

Business Units and Security Roles

a list of limitations and rules of CRM security read my exam notes


Creating the Advanced find

This advanced find was straight forward, I wanted to search the User entity for users who had security roles.

I selected user record, adding a condition to the security role where it contain data.

Advanced find users with security roles

Advanced find limitations

You cannot do Not in queries with advanced find.  If the requirement was to find all the users who didn’t have any security roles, this would have been impossible to do in advanced find.

Hopefully the Not query functionality will be added to Microsoft Dynamics CRM and the good news is there is a connect item we can vote up (it has over 600 votes)

Allow NOT IN searches in advanced find, marketing lists etc

The bad news is it has been an issue since 2011.  I have noticed a growing number of issues raised in connect, going through the channels Microsoft recommends and the issues not being fixed.

In the blog post Is Microsoft Listening to the Dynamics CRM Community? I suggest Microsoft should revamp the connect system and process so they can utilize the feedback generated by the CRM community to improve Microsoft Dynamics CRM.  At the moment I feel the Connect website and process is to slow and isn’t working.

If you need the functionality now I have seen two customizations you can try using

Building “Not In” Queries Using Dynamics CRM Advanced Find

Performing Outer Join in Advanced Find





Hosk’s Top CRM Articles of the week – 21st September

Lets start with a quote

To forgive is to set a prisoner free and discover that the prisoner was you.

I have got two articles of the week this week (it’s a fluid system) and neither of them are really articles.

Article(s) of the week

CRM Developer Extensions v1.2.0.0

The alternative to CRM Developer toolkit created by Jasson Lattimer CRM Developer Extensions is improving rapidly.  If you wondering why this is important then read where is the CRM developer toolkit for CRM 2015 and CRM Developer toolkit alternatives.

CRM Developer extensions has added some great new functionality

  • 1 click deploy plug-ins and custom workflow assemblies from Visual Studio
  • 1 click deploy reports from Visual Studio without having to go through CRM
  • Added CRM TypeScript template
  • Web Resource deployer

Importantly this works with CRM 2015 and it’s free

Podcast of the week

CRM Podcast TypeScript and JavaScript with David Berry

When ever I read or hear Dave Berry talk about CRM or TypeScript I learn something new and this podcast is full of interesting views and opinions.  It’s quite a long podcast about an hour long

Below we have some more Dave information and Links

Dave Berry MVP Q&A

Dave also did a great Q&A, easily the funniest one

Dave has a great article on Typescript and CRM
Introduction to TypeScript for (Xrm) Developers

What is TypeScript and how does it work with CRM 2011/2013

This article is the one I wrote, it’s more an introduction to typescript and where to find some more information

Best of the rest

Why the advanced find is a CRM Developers best friend

The Advanced is awesome, find out why

Why CRM Developers should always start with the CRM SDK

Always start with the CRM SDK, it will help you learn new features and functionality.

Undocumented Useful Script Functions in Dynamics CRM

Microsoft has a bunch of inbuilt script functions used by Microsoft Javascript code.  You can use those functions in your own code, you do need to be aware this is unsupported and Microsoft could change the Javascript at any moment

Just because everyone is talking about CRM 2016 don’t forget CRM 2015 Patch

There is a new CRM 2015 patch

Understanding levels of abstraction can improve your code design

Improve you code design and consider the levels of abstraction in your code

How to free storage space in Microsoft Dynamics CRM

Some great tips on reducing storage space on CRM online instances

Are your CRM plugins creating technical debt?

Is the way you write plugins causing technical debt in your CRM solutions?

5 Ways To Improve Microsoft Dynamics CRM Performance

Some tips to improve performance

Should you hire a Rockstar developer for your CRM project?

Do you want to put all your CRM development eggs in one basket?

Why you shouldn’t put unsupported customizations in Microsoft Dynamics CRM

Some reasons why you shouldn’t write unsupported customizations

Great Tool – OrgDBOrgSettings tool for Microsoft Dynamics CRM

Useful tool to tweak the CRM DB settings

CRM 2015 – How to Diagnose plugin errors

How to diagnose plugins errors, tips and good practices.

White Paper – Microsoft Dynamics CRM 2015 Performance and Scalability Documentation

Fantastic white paper on performance and scalability.

CRM and SQL Tip #01 – How to find out the Security Roles assigned to the user

SQL query to find security roles assigned to a user

13 signs your project is doomed

Signs you CRM project could be about to hit trouble.


Why Other Tech Talent Gets Paid More Than You by Lane Campbell 

The Myth of the Rockstar Programmer

good developers vs bad developers


A Dozen Things I’ve Learned from Charlie Munger about Inversion (including the Importance of being Consistently Not Stupid)

4 easy ways to communicate more clearly in writing

I have 75k saved up in my bank account. I’m 24 years old. I want to generate passive income and retire by 30. What should I do with the money or how should I invest it?

Book Lovers Alert: 8 Of The Most Spectacular Libraries In The World

How netflix reinvented HR

Netflix slideshow on HR

Good introductory article on machine learning

28 ideas to become 5 times more productive

Elon Musk’s First Wife On What It Takes To Become A Billionaire.

Disney’s $4 Billion Steal

Previous top picks

Hosk’s Top CRM Articles of the week – 1st September

Useful Hosk Links

Hosk list Of CRM 2013 Tools

A list and review of CRM 2013 tools, this will probably work in CRM 2015 as well

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

MB2-703 – CRM 2013 Customization and Configuration Certification Information

All the CRM 2013 content to help you pass the exam

HoskWisdom – Hosk Developer Quotes

 Words of Wisdom from the Hosk.  I have written over 900 articles, surely I should have said a few memorable things