Microsoft Dynamics CRM Developer Interview Questions

I found questions I used interviewing a CRM developer, The questions will give CRM developers an idea of the questions you might get asked in a CRM developer interview.

This article will help you prepare for a CRM developer interview.  The article will investigate the purpose of interview and discuss common topics with sample CRM developer questions

Interviews can be interesting experiences,  a time to reflect on your experiences and knowledge, but don’t be too good Should you hire a Rockstar developer for your CRM project?

Interviews are scary

Many people find interviews are scary because they contain the unknown.  When your mind thinks about unknowns it exaggerates things, focusing on worst case scenarios

  • Forgetting a technical detail
  • Not understanding the questions asked
  • You can’t remember any of your technical skills
  • The interviewer asking for skills and experience you don’t have
  • Turning up without trousers on
 I refer to this as the Stephen King television series concept.  The story IT is a great example
Stephen King television series start great, the monster is hidden in the shadows, mystery and unknown let people imagine something terrible as people disappear.
Interview are similar, you imagine how bad it could go.  It’s like the Stephen King series IT, the early stages and the clown is scary, when the final scary monster appears it isn’t scary (a big spider)

What is the purpose of the CRM Developer interview

Whilst preparing for the interview, consider the interviewer’s perspective and goals of the interview

  • What are the objectives of the interview?
  • Identify skills and experience for the role?
  • The interviewers context (e.g. developer, management, director)?
  • Will the interviewee work well with existing staff members?

People can exaggerate their CV’s, part of the interview process is validate what skills and experience the interviewee has.  You can assist in the process by giving as many examples of your experience and skills as possible.

Describe significant projects and your role in those projects, interviews are short so present the highlights of your recent experience.

The interviewer will see how truthful you have been on your CV and estimate your CRM knowledge and experience.

Key areas

CRM knowledge

  • Knowledge of CRM SDK
  • Understanding of CRM out of the box functionality
  • CRM certifications held


  • Projects
  • Your Roles on those projects (looking for role exaggeration is common)
  • Experience of CRM customizations
  • Size of project
  • Integrating external applications with CRM
  • Project style (Agile, Waterfall, others)


  • Where are you now?
  • Where are you going?
  • Why are you moving?

CRM certifications

I am a big fan of CRM developers getting certified (read why you should get certified and the benefits).  Studying for a CRM certification gives developers a good knowledge of out of the box functionality and its limitations.

Here are links to resources to help you pass the Customization and Config CRM certification


Certifications show knowledge of Microsoft Dynamics CRM, it gives no sign the person can create effective CRM solutions.  Certifications don’t show character, or how they will work with other team members.

Learn new CRM features and functionality

Learning new CRM features, understanding new functionality, keeping up with latest version of CRM shows a person is self-motivated learner.

If you haven’t worked with the latest version, having knowledge on new features is the next best thing.  Staying up to date with new versions of CRM and new functionality is being prepared for using it.

Experience and knowledge of CRM

Experience is an important commodity, you can’t buy it or learn it, only gain it.

I have seen .NET developers new CRM, struggle with CRM development due to the lack of CRM experience.

Why .NET developers struggle with CRM development

Whilst getting experience, CRM developers make and learn from mistakes and mistakes cost time and effort.  Those with experience are less likely to make the same mistakes.  Experience increases the chances of a successful CRM project.

Give examples of your experience in as many answers as possible, experience is one of your most valuable assets.


There will be questions on your career ambitions where do you see your career now? where do you see your career going?

Think about your career, you should have a destination in mind and a route to getting there.

The CRM world is small.  If unsuccessful in this job, you might work with the interviewee in this company or a different company.

Don’t criticise

NEVER be negative or critical about your colleagues. This wastes interview time on negative things, instead talk about your skills and experience.

No one likes to work with someone who criticises and blames their colleagues.  If you criticise your current colleagues, it’s likely you will criticise people in your new company.

Build your brand

Building your brand is preparing for an interview before you get an interview, it is not a quick process but a continuous process.

Build your brand by

  • Write a CRM blog
  • Create Youtube videos on Microsoft Dynamics CRM
  • Answer forum questions
  • Tweet about CRM
  • Create CRM tools
  • Slideshows/presentations
  • Attend CRMUG or other live CRM events
  • Interact with CRM community

Contribute to the CRM community, this could lead to you knowing and being recommended by employees of the company.  You can make a good impression before you make your first impression in the interview.

Creating content gives examples of your CRM ability, knowledge and experience, which can be found by the interviewers.

The Hosk CRM blog interviewers can see my CRM knowledge and experience and get an idea of who the Hosk is (yes the Hosk does like talking in the 3rd person!)

  • Your brand is you
  • Your point of view
  • Your experience
  • Your voice

Embrace your individuality, don’t copy other content but create your own unique content.  Creating a brand isn’t just selling yourself to people, you want to create a compelling interesting brand like the Apple iPhone compared to many android phones you can’t distinguish between.

CV and Project experience

You be asked to walk through your CV and explain it in detail, particularly the projects

  • Projects you worked on
  • Different customizations you created with problems/benefits
  • Different roles worked on projects
  • Project problems and how you overcame them

Practise Relentlessly

Interviewing is a skill, the more you practise a skill the better you get.  For an interview you are giving a presentation on yourself.

In the book Talk Like TED: The 9 Public Speaking Secrets of the World’s Top Minds, it has a great quote on practising your presentation

Practice relentlessly and internalize your content so that you can deliver the presentation as comfortably as having a conversation with a close friend.

Carmine Gallo

There is no excuse for not being prepared for a presentation where the topic is yourself.

Practice talking about your CRM experience so you can explain the projects, roles and the positive skills and experiences you got from them.

Practising helps you give a great interview because instead of thinking what to say, you are familiar with the content and are focusing on delivery.

Information to help prepare

Read Hosk Developer articles

These articles offer insights into understanding the CRM, CRM SDK and CRM developer processes and best practices.

Your approach to CRM development, diagnosing problems and best practices are key parts of a CRM developer.  Knowledge and skills can be learnt, but character and processes take longer.

Final Hosk tip

Skills and experience are important, but character is the vital.

Be confident and enjoy the experience if you don’t get this job it will have been an opportunity for you to practise your interview technique.

Make sure you have some questions to ask the interviewer. Moving job is a big decision, make sure the company is a great one, it’s likely you will be there for years.

8 Insightful Questions Only The Smartest Candidates Ask In A Job Interview

Enjoy the interview, you have nothing to lose and a job to gain.

Other CRM interview questions

This site has some great interview questions and answers

A collection of CRM interview questions for CRM 2011

CRM 2011 – Common CRM interview questions but what do they tell you?

Hosk‘s CRM Interview questions

I’m not going to give the answers to the questions because they would be my answers.  The questions are ones you might get asked, so if you are going to an interview think about the answers to show case your experience and thoughts on CRM development.

Q.  What is your CRM experience?

Question Purpose – A summary of CRM experience, your CRM career journey.

Mention – Role and experience, concentrate on the most relevant experience for the role

Q.  Tell me about your last CRM project?

  • Size
  • Complexity
  • Customizations
  • Integration

Question Purpose – The question aims to find out the experience of the

Mention- Mention different customizations, difficulties experienced and how you overcame them.  Show what skills you used and will bring to the role.

Q.  What development tools do you use for CRM development?

Question Purpose – CRM developers can answer this question if they have done CRM development.

Mention – CRM Developer toolkit, XrmToolkit, Ribbon Workbench, Plugin Registration.  Tools used in CRM development which you use.

Q.  When do you use managed and unmanaged solutions?

Question Purpose – Does the developer the differences between managed and unmanaged solutions, which can be a pain.

Mention – Discuss your experiences with Solutions, how you used them.  How would you use solutions.

CRM 2013 – Understanding Solutions and how they work

Q.  What are the disadvantages of managed and unmanaged solutions?

Question Purpose – Explain when to use managed solutions and when to use unmanaged solutions.  Solutions are key part of releasing the customizations to the customer, if done badly can cause problems and waste time.

CRM 2013 – Managed solution problems with out of sync solutions

Q.  How do you set up your CRM solutions?

Question Purpose – You can package the CRM solutions in lots of different ways, releases/sprints/phases, splitting up the customizations by type (e.g. plugins, javascript) or creating solutions with different functionality in.

Mention – Your experiences or ideas of how you think solutions should be created.  There is no right or wrong way

Q.  What are the potential problems with multiple developers working on a project?

Question Purpose – What development environments have you worked in, with how many developers, problems and solutions.

Mention – How you have developed solutions with a team of developers and what problems can arise.

Q.  How do you debug a plugin?

Question Purpose – Lots of CRM Developers debug in different ways but it’s an important skill because CRM developers must test be able to test and debug their code.

Mention – How you debug, e.g. Unit Test, console app, Remote Debugging or plugin registration tool

Q.  How do you debug Javascript?

Question Purpose – Debugging Javascript is a necessary skill for a CRM developer

Mention – Pressing the F12 key and getting your breakpoints setup and hit.  If you haven’t done this, try it out, it’s awesome.

Video CRM 2013 – JavaScript tutorial using CRM 2013 Developer Toolkit

Dynamics CRM 2011 JavaScript debugging in Internet Explorer 11

Q.  Have you integrated CRM with other systems, what was it and did you have any problems?

Purpose – Integrating CRM with 3rd party application or other Microsoft products is common.  It’s great if CRM developers have experience of this..

Mention – Any experience you have, problems you experienced and how you overcame them.

Q.  How to you estimate CRM customizations?

Question Purpose – Developers have to estimate work.  The greater accuracy you can estimate the better.

Mention – explain how you estimate customizations.  e.g. breaking up the work into smaller chunks, taking into account risks and experience.

Q.  Tell me about a project which went wrong, what were the reasons for the problems, how did you cope?

Question Purpose –  Projects can go wrong, problems will happen.  Showing the character to overcome problems and obstacles is an important skill.  Identifying the cause of problems, taking steps to avoid them will be useful to your prospective employer.

Mention – The lessons learnt and how you avoid potential problems.

Q.  How do you test your code?

Question Purpose – Unit testing code is great.  if you have experience mention it.  This question is asking how you test the logic of your code, which might not be unit testing.  You might debug your code or write a console app to run your code.

Mention – Unit testing knowledge and experience if you have it.  Your process of testing code.

Q.  Explain how pre-validate, pre and post are different plugins?

Question Purpose –  Specify how running a plugin in a different stage changes the purpose of the plugin e.g. pre before data is written to the database, post is after the changes have been written to the database.

Mention – Plugin stages, images and when you use each .

Q.  How are Asynchronous and synchronous plugins different?

Question Purpose –  Does the CRM developers understand the difference? Explain when to use an Async plugin instead of synchronus plugin.

Mention – Time.  Synchronus plugins must run straight away, async plugins can be delayed.

Q.  What is a common cause of plugin bugs?

Question Purpose – To find out if the developer has experience developing, if they have they will have experienced common errors.

Mention – The most common error is an infinite loop caused by updating fields, which triggers the plugin to run again and again

Q.  What is early binding, what are the benefits and the drawbacks?

Question Purpose – To understand if you the CRM developer understands the benefits of early binding.

Mention – Early binding creates strongly typed code which is easier to read and moves the errors to compile time and not runtime.  Early binding stops syntax errors which can occur with late bound code.

Q.  Should you keep up with the latest release of Microsoft Dynamics CRM?

Question Purpose – Does the CRM developer understand the benefits and disadvantages of keeping your version of CRM to the latest release.

Mention – Whenever you upgrade your CRM your customizations might stop working but you get the new features and fixes.  If you delay you have more versions to catch up to.

Should you keep up with Microsoft Dynamics CRM release cycle?

Q.  How do you keep up with Microsoft Dynamics CRM news?

Question Purpose – Does the CRM developer keep up to date with CRM, if so, how?

Mention – Blogs, certifications, Microsoft Dynamics community page

Q.  What is the effect of making a plugin sandboxed?

Question Purpose – CRM online can only deploy sandboxed plugins, so it’s important for a CRM developer to realise the limitations the sandbox can have.

Mention – CRM online can only deploy Sandboxed plugins and  Limitations such as

  • Access to the file system (C Drive)
  • systemevent log
  • certain network protocols
  • registry
  • You cannot access any other DLL’s
  • IP addresses cannot be used
  •  Only the HTTP and HTTPS protocols are allowed.
  • In isolated mode you cannot call any external DLL’s\DLL’s in the GAC

This blog had some good restrictions in a bit more detail

  • Attempting to use the AppDomain.CurrentDomain.AssemblyResolve event
  • IO.Path.GetTempPath() [System.Security.Permissions.EnvironmentPermissionException]
  • Any filesystem access code [System.Security.Permissions.FileIOPermissionException]
  • Attempting to use the EventLog [System.Diagnostics.EventLogPermissionException]
  • Attempting to use IsolatedStorage [System.Security.Permissions.IsolatedStoragePermissionException]
  • Any references to Thread.CurrentThread caused a security failure.

Read this blog Understanding Plugin sandbox mode for more information

Q.  When do you use OData?

Question Purpose – To test if the user has written many JavaScript customizations

Mention – OData is the primary method to retrieve information from related records

Q.  What Access teams and why would you use them?

Question Purpose – Access teams are not widely used, does the developer know what Access team are and how they work.

Mention – The purpose of access teams are to easily share records with a team of people where the members of the team are not static.

CRM 2015 – The benefits of Access Teams

Q.  What is Metadata and how is it used in CRM?

Question Purpose – Does the CRM developer know what Metadata is and how it works with CRM

Mention – Metadata is the data about data.  CRM has lots of Metadata, types of field, optionset value, auditing etc.  To retrieve Metadata you need use webservices, RetrieveEntityRequest for entity Metadata and RetrieveAttributeRequest

CRM 2015 – Understanding CRM Metadata

Q.   What things should you consider when choosing between CRM online or on Premise?

Question Purpose – CRM online has several limitations compared to CRM on premise, a CRM developer should understand them.

Mention – The big difference is you can’t see or modify the CRM server and SQL server.  CRM Online limitations, such as Sandbox plugins, workflow limit of 200, custom entities 300, storage is a monthly fee.

Q.  Why is code readability important?

Question Purpose – To find out if the developer designs code, codes to best practices

Mention – Reading and understanding code is important because code spends most of its time in a maintenance state.  Developers will need to read and understand code to extend the code, debug the code.

Why Code Readability is important

Q. If a user complained a particular CRM form is loading slowly, how to investigate, what to look for?

CRM 2011/2013 Investigating CRM Form Performance issues

Q.  If CRM stopped working, what would you check?

Question Purpose – This test experience.  CRM will stop working on production systems is good to know a CRM developer will know what to check.  To understand what to check the CRM Developer will need to understand the architecture of Microsoftt Dynamics CRM.

Mention – CRM Async services stopped, APP Pool service account password, SQL Server services, Disk space, Active Directory

Microsoft Dynamics CRM not working? check these common causes

Q.  What is the POA table and how can it affect performance?

Question Purpose – The POA table is used for security and sharing.  A large POA can cause performance problems

Mention – security, sharing problems.

PrincipalObjectAccess–Performance Recommendations

How would you questions?

Q.  validate a phone number on a form

Q.  Add a sequential counter to a custom entity

Q.  Automatically fill in an address field when a user selected a contact lookup field on a custom entity.

Q.  Send an email on the creation of an account record.

Q.  Update a status with a plugin

CRM 2013 – When using FetchXML is better than OData

“Ordinary people think merely how they will spend their time, a man of intellect tries to use it.” – Schopenhauer

I had a tricky problem where I need to select a lot of fields from an entity which was riddled with duplicates.

The oData query was bringing 1525 rows but after getting rid of the duplicates I was left with 25 rows!

OData  has no distinct

So why was the OData query bringing back so many rows because there is no distinct.  So the code was retrieving lots of data, it was then removing the duplicates.  It was a lose/lose scenerio

  • longer retrieve with more data
  • more time spent on getting rid of the extra data we didn’t need

I needed to clarify is there is no way to retrieve a distinct set using OData.  I looked on the internet and SDK but there is no distinct function with OData


A Developer mentioned FetchXML has a distinct field, I could change the query from OData to FetchXML and be able to filter the records returned.

I checked with Advanced find and you can’t set the distinct field attribute.

FetchXML has a number of aggregrate functions which are listed on this page – Use FetchXML aggregation

The following aggregate functions are supported:

  • sum
  • avg
  • min
  • max
  • count(*)
  • count(attribute name)
FetchXML also has some Groupby functionality, which can be very useful

How to Generate the FetchXML

So I did an Advanced find, copied the xml and found in Tanguy Toolbox XRMToolBox there is a fetchXML Tester.


I recommend the FetchXML Builder, which you can download and then will work with the XRMToolBox

FetchXMLBuilder can be downloaded here

The FetchXML Tester will run any fetchXML you have generated from an Advanced find, once you have the core FetchXML you can then edit and change it but it’s quicker to use Advanced Find to get something to start with.

The FetchXMLBuilder is better for creating new FetchXML queries because it has a great UI to allow you to build up a query.

It’s a bit like the Dynamics CRM OData Query Designer but for FetchXML.  I used it recently to query when a certain Plugin assemblies had been uploaded

fetchxml 1


This is an example of the FetchXML tester with the Distinct set to true

<fetch distinct='true' mapping='logical' aggregate='false'> 
   <entity name='account'> 
      <attribute name='attribute name' alias='alias name'/> 

Here is the example I created

Tools can help

I was lecturing/Advising a junior developer who had a similar requirement.  He was about to manually create a big soap command to run the fetchXML.

Instead of doing it yourself, see if there is a framework or tool to help you.  Find a framework first, which will do all the nasty donkey work for you of creating the soap messages.

Microsoft Dynamics CRM has lots of tools, solution and frameworks created by the CRM community, it’s often worth looking for a tool/framework to see if someone has resolved the problem.

I have reviewed lot of tools here

Hosk’s CRM 2013 Tools List

For this problem I needed a framework instead of a tool, I narrowed it down to two

XrmServiceToolkit – A Microsoft Dynamics CRM 2015/2013/2011 JavaScript Library

CrmFetchKit.js – Script Library for Dynamics CRM (SOAP)

Both could have done the job but I chose XRMServiceToolkit because it had more followers on CodePlex and seemed easier to use.  I had experience using it before, it’s always easier to do something when you have got it working before.

The XRMServiceToolkit looked a more complete solution.


So instead of doing an OData call, retrieve thousands of rows and then removing the duplicates, I changed to use a FetchXML from JavaScript using the XrmServiceToolkit which returned just the rows I needed and was much quicker.

There are lots of alternatives in Microsoft Dynamics CRM and the skill of a good CRM Developer is choosing the right customization for the job.  Choosing the right customizations is often understanding the limitations of each type of customization.


Hosk’s Top CRM Articles of the week – 2nd November


A great list of articles and blog posts this week, enjoy.


Some men learn all they know from books; others from life. both kinds are narrow. The first are all theory; the second are all practice.

It’s the fellow who knows enough about practice to test his theories for blow-holes that gives the world a shove a head, and finds a fair margin of profit in shoving it.

George Lorimer, Letters from a Self-Made Merchant to His Son

The kernel of a strategy contains three elements: a diagnosis, a guiding policy, and coherent action. The guiding policy specifies the approach to dealing with the obstacles called out in the diagnosis. It is like a signpost, marking the direction forward but not defining the details of the trip. Coherent actions are feasible coordinated policies, resource commitments, and actions designed to carry out the guiding policy.

Good Strategy/Bad Strategy: The difference and why it matters by Richard Rumelt.

To get an overview of the book read A primer on strategy from the excellent Farnam Street blog

Article of the week

CRM Chart guy says Funnel Charts Suck and You Shouldn’t Use Them.

If you have tried to wrestle, persuade, force, shout at, plead, or trick the charts in Microsoft Dynamics to show something useful, you will realise it’s a difficult job.

For this reason you have to admire the awesome blog posts from CRM chart guy

Best of the Rest

CRM 2015 – The benefits of Access Teams

Understand the benefits of Access teams and start using them

A free customizable Editable Grid for Dynamics CRM 2013/2015!

A free editable grid

CRM 2015/2013 – All you need to know about Database Encryption

Database encryption can cause problems if you restore a backup of a CRM database because the encryption won’t work.  This article will help you understand what is encrypted and how to add the encryption key

Your Interaction Network in Dynamics CRM

Great post from CRM MVP Jukka explaining Activity Party and how data interacting with you is held and can be displayed in CRM

Meet the 7 major improvements of the new MS Dynamics CRM 2016

The highlights of CRM 2016, it’s coming soon

Microsoft Cloud Certification could allow complex CRM solutions to go online 

There’s a different choice between on-line or on-premise

Using Full-Text Search to improve Dynamics CRM search experience

Shows how you can search full text in CRM

Querying with no table lock

FetchXML has no table lock, who knew

CRM MVP Daniel Cai shows you how to get data into CRM faster

Great Slidedeck showing you how to import data in CRM

How to find the number of users connected to a SQL Server database

An SQL query to tell you how many users are connected to your CRM database

CRM 2011/2013 – Understanding and adding the deployment administrator role

Do you understand the Deployment Admin roleChanging a Custom Entity Icon in Dynamics CRM

whitepaper – Deploying Microsoft Dynamics CRM in Microsoft Azure Virtual Machines

Four Acquisitions To Make Dynamics CRM Awesome

Leon Tribe informs Microsoft of the next businesses they should buy, Listen up Microsoft

Microsoft Dynamics CRM not working? check these common causes 

If Microsoft Dynamics CRM on premise has stopped working, check out these common causes

Bulk Delete

Answers to common bulk delete questions

Microsoft Dynamics CRM and Sandbox to Production Revisited

Comparing the sandboxes of CRM and Saleforce

Upgrading CRM: How to Move from a Data-driven CRM to a Process-driven CRM

Do you need to change your thinking and processes when moving to from CRM 2011 to CRM 2013/2015

CRM Performance: Nothing is Gained by Running

Why rushed projects/code doesn’t save time and reduces quality

Running faster doesn’t always get you there quicker.

Eight ways to ensure the failure of a CRM project management (Part 1)

13 signs your CRM project is doomed

If you’re having CRM problems I feel bad for you son

I got 99 problems but my CRM Project ain’t one.


Moore’s Law Turns 50

Coding by the Book: The 7 Books Every Software Developer Should Read

SQL Server 2016: Everything built-in

Please, don’t commit commented out code

Why coding skills are not enough for a developer to get hired


What Book has the Most Page-for-Page Wisdom?

First, interact

The Multitasking Virus and the End of Learning? Part 2

A Primer on Strategy

Previous top picks

Hosk’s Top CRM Articles of the week – 13th October

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

CRM 2015 – The benefits of Access Teams

Access teams are an underused feature in Microsoft Dynamics CRM because the benefits of access teams are not clearly understood by many CRM professionals.  

When I have asked fellow CRM professionals about Access teams most had only heard of Access team and none had ever used them.

This post will explain
  • What are Access Teams
  • The benefits of Access Teams
  • When to use Access Teams
This week a new plugin was added to the XrmToolbox to XrmToolBox plugin for moving access team templates, which prompted me to investigate Access teams.

What are Access Teams?

I learnt about Access teams because it’s on the CRM 2013 customization exam.  Study for certifications are a good method to learn new functionality added to Microsoft Dynamics CRM.

Here is some information to help study for Microsoft Dynamics CRM customization certification and this post explains the benefits of acquiring Microsoft Dynamics CRM certifications 

To get an introduction to Access teams read

CRM 2013 – MB2-703 – Access Teams and Access Team Templates how to use them and key facts

There is a great white paper on access teams 

The purpose of access teams is a dynamic way to share records with users without using the default sharing functionality in CRM or security roles.

Access teams are enabled on an entity basis.  When Access teams are enabled for an entity, a grid will appear on the record.  Any user record you add to the grid will have permissions (controlled by a template) to the record.

Access teams are a quick way to share records to an ad hoc team, an example is people working on an opportunity record.  Instead of using security roles/teams/business units to give access or sharing the record you can add the users to the access team.

A key fact to remember is Access teams don’t have security roles.  Because Access teams don’t have security roles this prohibits them from owning records because they cannot be granted the privilege to own a record.

Team confusion

Confusion understanding the purpose of Access teams is because team functionality exists in CRM, users aren’t clear how Access teams are different.

The table compares Access Teams and Owner Teams.

  Access Team Owner Team
Can own records No Yes
Team can be assigned security records No Yes
Manually created and managed No Yes
Displayed in Team views No Yes
Cached by CRM Server when user logs on No Yes
Use Team template to define security priviledges Yes No

Access teams remind me of field level security (how to setup field level security) because the template specifies a simple security permissions

Access teams share record permissions without the overhead of using the full CRM security model, avoiding the sharing overhead which can occur with a complex security model.

The benefits of access teams

A benefit of studying for the CRM customization certification is learning how Access teams work, it doesn’t teach you how and why you when you should use them

reminds me of this quote

Some men learn all they know from books; others from life.  both kinds are narrow.  The first are all theory; the second are all practice.

It’s the fellow who knows enough about practice to test his theories for blow-holes that gives the world a shove a head, and finds a fair margin of profit in shoving it.

George Lorimer, Letters from a Self-Made Merchant to His Son

Two great resources for learning the benefits of Access Teams

Reduced sharing overhead

Sharing records in CRM can cause the POA table to grow in size.  A large POA table can affect the performance of your CRM system.  Access teams offer a way to share permissions to records to individuals but using CRM managed access teams

The performance benefit of Access teams is it shares using teams is more efficient than sharing to individuals.

Adam Vero corrected when I mistakenly put Access Teams don’t use the POA table, this is false, Access teams write records to the POA, it uses a team rather than an individual users.

Quick and ad hoc

If your need is to share records to groups or individuals, not in teams, Access teams is great for sharing permissions to unrelated individuals quickly and easily.

Manage sharing

Managing shared records in Microsoft Dynamics CRM can be difficult (can you remember how to see what records are shared with whom?).  Using Access teams it’s easy to see who the record is shared with and add/remove users.

Improved performance

Read Adam Vero‘s section on Performance Improvements because he explains it better than me.

Access team facts

  • When records are deactivated, access team permissions are not effected
  • Access teams don’t have security roles
  • Access teams can’t own records
  • Access teams are created and managed by CRM
  • An access team is created when you have added the first user
  • Access teams are not visible in default team views
  • Sharing records via access teams isn’t displaying in the sharing screen
  • Access teams can’t be used in resource scheduling
  • Multiple access teams can be linked to a single record

Understanding Access Teams

We understand Access teams,  how they work and the benefits but when should you use Access teams?

If you are sharing lots of records, investigate an alternative method of sharing records which does not grow the POA table.  Sharing records are difficult to manage to individuals, you should use teams.

When to use Access teams

When you need to grant permissions on individual records.  Access teams are great if you need to grant permissions to different individuals and not teams.  A good example is granting permission on an opportunity to users from different areas, sales, marketing, support who are creating a proposal/demo.

If the group of people who need to access a record will change often, Access teams offer a way to add/remove users who can access the record.

Access teams are great for quick/ad hoc sharing

When not to use Access Teams

If security is important it’s better to use the default CRM security model.  Access team members can add/remove other users which might compromise the security of the record. Default security is more powerful and nuanced, Access teams have 5 levels of permission.
When teams are static it’s better to use Owner teams to manage access to records.
If the volume of records being shared/view is high, managing permissions through Access teams will take too long.

The problem with access teams

Microsoft added Access teams into CRM 2013 but then forgot to add any functionality to export/import Access team templates between CRM instances.

This topic is explained CRM 2013 – Why are access teams marooned?

With Access teams not included in the CRM solution it means Access team templates need to be manually recreated in all your CRM environments, this massive overhead, almost makes Access teams unusable.

Access teams have a connect request Access Team Template in CRM Solution

This request is active, created on 11/27/2014, it has 68 votes but as yet Microsoft have not responded.  Is Microsoft Listening to the Dynamics CRM Community?

I understand Microsoft are working on updating the connect platform, this will be a welcome change but I would like to see more responses from Microsoft.  The most disappointing part of the Microsoft Connect experience isn’t the poor user interface its the fact Microsoft doesn’t seem to be listening to the suggestions of the CRM community.

Access Team templates tool

The CRM community is awesome and Lucas Alexander has created a plugin for the XrmToolbox to move Access team templates.

XrmToolBox plugin for moving access team templates

The tool allows you to easily export and import Access team templates between CRM organisations

Try Access Teams

If you haven’t used Access teams, open a CRM trial and try them out.  Access teams are  a great way to share individual records to individuals without impacting the POA table.

Now you understand how Access teams work, the benefits and when to use them.   You can see where it might be appropriate to use them or advise your customers the functionality Access teams provide.

CRM 2015/2013 – All you need to know about Database Encryption

There are two types of encryption: one that will prevent your sister from reading your diary and one that will prevent your government.

Bruce Schneier


Encryption problems don’t occur because Microsoft Dynamics CRM encrypts password fields. Problem’s occur if you don’t realise CRM 2013/2015 database are encrypted and encryption keys need to be looked after.

CRM 2013/2015 and future versions automatically creates a default encryption key and encrypts data in CRM.

Understand how database encryption works to ensure they don’t lose the encryption key or create a situation where they don’t know where the original encryption key came from.  Retrieving encrypted data isn’t possible with the encryption key, deletion and recreation will be your available options.

Along came an SQL Encryption error

In a CRM 2013 dev organisations clicking on mailboxes would bring up an SQL encryption error

No one turned on database encryption, so this raised questions

  1. Why were SQL encryption errors appearing?
  2. Why in one of our dev organisations?

Database encryption was introduced in CRM 2013, automatically enabled and encrypts email password fields.

Developers won’t notice database encryption in a new CRM organization because an encryption key is created for you, all functionality works and mailbox passwords encrypted.

It wasn’t until we created a DEV environments from a copy of a CRM 2013 org and restored it, SQL encryption errors appeared.

If you attempt to look at the database encryption settings on an http on-premise organisation you will get an SSL error.

Data encyption - no https

It’s not uncommon to find the CRM developer bashing head on desk whilst pulling out his hair.

When you work out how to turn the SSL check,  you then get presented with a blank certification field with a helpful place to past the encryption key? Erm……what, where, who is the encryption key (repeat head banging).

If you are lucky the encryption key is in the original database, Other scenarios could be the original database is deleted or you can’t remember what CRM org was the original.

Why it’s important for Developers to know

Database Encryption gets turned on automatically, if you backup/copy and restore a CRM organisation the copy database won’t have database encryption key.  It’s easy to copy the database encryption key once you know where to look, it’s important to plan because encryption keys can change or get lost.

What won’t work if you don’t have your database encryption key?

  • Server side Sync
  • Mailboxes (opening)
  • Cannot update user email addresses
  • Cannot update mailbox emails

If server side sync doesn’t work workflows sending emails might not work

You cannot change emails of users and mailboxes.

The biggest problem I experienced was the loss of time.  Time investigating the problem and understanding database encryption.  The investigation stopped development on areas which needed email functionality using server side sync.

The forum title below captures the feeling

HELP! My data is encrypted and I didn’t do it!

It’s important for CRM developers to understand database encryption in Microsoft Dynamics CRM is because it’s automatically turned on and cannot be disabled.

If you restore a CRM database the database encryption won’t be activated, encrypted data isn’t available to your CRM instance, certain email functionality won’t work, throwing SQL encryption errors.

Restoring databases can happen when creating new development environments, QA, TEST, PREPROD environments.

If you create a new CRM organisations for each environment, each CRM database is automatically encrypted with its own key.

If you copy and restore CRM organisations you MUST copy the database encryption key from the original CRM database and activate the database encryption.  CRM developers need to be proactive and mange the encryption keys, to avoid ending up in a mess.

Why doesn’t the encryption key copy

The data encryption key is stored in the MSCRM config database and not in the instance CRM database.  So when the bak file is imported into a new CRM org it doesn’t know how to get the key because the key isn’t in the bak file.

It can’t get it from the MSCRM_config because by creating a new org you will create new /different data in the MSCRM_config.  Each CRM database will have its own encryption key.

What is Data encryption

Always start with the CRM SDK

The CRM SDK has two articles on database encryption, The first describes what SQL field level encryption is and does.

Field-level data encryption

Microsoft Dynamics CRM uses standard Microsoft SQL Server cell level encryption for a set of default entity attributes that contain sensitive information, such as user names and email passwords. This feature can help organizations meet FIPS 140-2 compliance.


This article explains changing and copying your encryption key.

Data encryption 

A 5 minute video to explain the basics of database encryption

Microsoft Dynamics CRM 2013 Setup and Upgrade New Features – Data Encryption

The video states Yammer tokens are encrypted, I’m not sure what this means or if Yammer won’t work on a database which isn’t encrypted,

What is encrypted?

Passwords for email are encrypted but what does this mean?

The article describes what is encrypted

Entity Attribute
EmailServerProfile IncomingPassword
EmailServerProfile OutgoingPassword
Mailbox Password
Queue EmailPassword
UserSettings EmailPassword

I found the answer on this page, If you lost your encryption key


  • Mailbox
  • Email Server Profile

If you do an advanced find and use the entity of Mailbox.

You will get a list of mailboxes, if you click on one, on an encrypted database where you have lost the encryption key you will get this message

Data encyption 2

If you are wondering where the mailboxes are used, each user has a queue and each queue has an Emailbox

Why is data encrypted

Understanding the purpose of functionality, makes it easier to comprehend the logic driving the functionality.

The purpose of encrypting user and password fields in CRM is to hide this information from CRM developers/CRM Admins.

Data encrypted is around email functionality is because Microsoft Dynamics CRM has no email functionality.  Email functionality is outsourced to

  • Email Router
  • Server side sync
  • CRM users Outlook

To use external email services, it passes credentials to the other services, to make things secure CRM encrypts this data.

CRM Encryption Facts

Is database encryption is automatically turned on?


Whilst writing this article I get confused whether database encryption was turned on on or not

This paragraph in Field-level data encryption confused me

The encryption key is required to activate data encryption when you import an organization database into a new deployment or into a deployment that has had the configuration database (MSCRM_CONFIG) recreated after the organization was encrypted.

The paragraph is saying (and the cause of problems I experienced) selected fields are encrypted, its turned on but not activated on imported databases.  You will need to activate encryption by copying the correct encryption key, which you can find on original database.

Database encryption facts

  • When doing a retrieve on an encrypted field value, a null is returned
  • Encrypted fields cannot be indexed
  • Database encryption is automatically turned on for any CRM versions of CRM 2013 and higher.
  • You cannot turn database encryption off
  • You can set and retrieve the database encryption key using the CRM SDK see here
  • The SSL check is automatically turned on but can be turned off by updating the field on the mscrm_config database
  • Users with the Microsoft Administrator role can change the CRM encryption key
  • All the encrypted fields are password fields
  • Default encryption key setup during setup
  • All new and upgraded (which means all) CRM version will have data encryption enabled
  • You can’t audit or customize the encrypted fields

Common Database Encryption questions

Database encryption is likely to interest CRM developers when things have gone and you have restored a CRM database.  I will cover the common scenario’s and give  links to the answers

Can you change the database encryption key?

Yes, but you have activate database encryption.  If the database encryption key field is blank you need to copy a the key from the original database.

I can’t check the database encryption because of the SSL check?

Microsoft turned on the SSL check by default, all on-premise CRM installations which are not SSL enabled cannot open the data encryption screen.

Data encyption - no https

To view the data encryption details you need to disable the SSL check

Go to Settings –> Data –> Database

Data encyption

You cannot check the Data encryption key on a database if CRM is not SSL (HTTPS).  This is because the Microsoft config database MSCRM has a field to stop CRM

You need to connect via SQL manager to view and change the database field on the MSCRM_Config database DisableSSLCheckForEncryption

I don’t recommend changing a CRM database,  particularly the MSCRM_CONFIG because this is unsupported by Microsoft

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

The only time you can access the database is when Microsoft say you can on this page

When the Microsoft Dynamics CRM (on-premises) website is not configured for HTTPS/SSL, the Data Encryption dialog box will not be displayed. For a more secure deployment, we recommend that you configure the website for HTTPS/SSL. However, if the website is not configured for HTTPS/SSL, use a tool that can be used to modify CRM database tables, such as Microsoft SQL Server Management Studio or the Deployment Web Service, open the configuration database (MSCRM_CONFIG), and in the DeploymentProperties table, set DisableSSLCheckForEncryption to 1.

We have permission, here is the SQL

This views the data

SELECT [ColumnName], [BitColumn]

FROM [MSCRM_CONFIG]. [dbo].[DeploymentProperties]

WHERE ColumnName= 'DisableSSLCheckForEncryption'

This updates it

UPDATE [MSCRM_CONFIG].[dbo].[DeploymentProperties]
                SET [BitColumn]=1

                WHERE ColumnName='DisableSSLCheckForEncryption'

You need to do an IISReset after changing the database value, until you do you won’t be able to access the database encryption screen.

You can set the field back after you have got the database encryption key if you wish.

Set by step instructions here

My Database has no encryption key

If you have turned off the SSL check and there is no database encryption key, it means you have a restored database.  You need to find the original database and copy the database encryption key

This article will help

Data encryption errors after restoring CRM database

Best practices – Backup your key

Microsoft recommends changing the database key once a year, the article below describes how to backup your encryption key

What if you lose your key

You are in a pickle!

I read this blog post – Tip of the day if you lost your encryption key

It states you can add a new encryption key if you delete the encrypted data.  Deleting the data is difficult because mailboxes are linked to User and Queues, which means they are Dependant.

You cannot delete the data using the UI, I tried using the CRM SDK but got the same dependency errors.

This forum post suggests you can null but I’m not sure this would work (make sure you backup the DB)

HELP! My data is encrypted and I didn’t do it!

One solution is to create a new CRM organization and import your solution files.  This works because the a new database is automatically encrypted, so you don’t need to recover the database encryption key.

Good articles on CRM and database encryption

CRM 2013 and SQL encryption



The pain of setting up CRM Dev environments

“To see what is in front of one’s nose needs a constant struggle.”

George Orwell

Whilst creating a console app to create email records in CRM I find my CRM dev environment working against me rather than assisting me.

Setting up a CRM environment tasks

  • Restore a copy of a CRM organisation
  • Configure the custom project data
  • Configure CRM settings
  • Setting up web service’s (web.config, copying dll‘s)
  • Import data (How to create realistic Test Data for your CRM Project and why you should)
  • setting up users + security
  • testing everything is working

Configuring the data involves having both systems side by side and ensuring environment-specific settings are setup correctly.

Setting up environments is done in copying mode and not thinking mode, which can lead to mistakes.

The frustrating part is I’m not testing but spending time on creating my environment to enable me to test.

Copying and changing data can be done with no need to think.

Create a plan

You were born to win, but to be a winner, you must plan to win, prepare to win, and expect to win.

When creating a test environment, get a piece of paper and create a list of all the items you need to create/import/setup in order for your new Dev environment to be created successfully.

If you don’t create a list, it’s easy to miss important steps.  Not having a plan is trying to get to a destination without having a map, you will end up wandering around not knowing how near or far you are.

A common scenario is developers end up, installing and setting up lots of different parts of a new DEV system, not keeping track of what they have done.  When the new CRM dev environment doesn’t work they are not sure of the cause because they have changed numerous variables.

If you don’t create a new Dev organization systematically on creation, you will need to work systematically when trying to diagnose the problems.

It will be less frustrating to set up the Dev organisation systematically.

What if it still isn’t working?

Don’t Assume, Know

The above line is a mantra I use when diagnosing problems, which I discuss in this blog post

CRM 2015 – How to diagnose plugin errors

Make a list of the common problems with setting up your CRM system, check them and tick them off the list.

In this example I found a web service wasn’t working.  I tried checking lots of things, before finding the password for the web service app pool user had expired!

I would have found this problem sooner if I hadn’t assumed it was working

As I mention in Sherlock Hosk and the case of the annoying bug you need to work through potential causes, tick them off and narrow the list of potential problems

When debugging, eliminate what isn’t causing the problem and whatever code or customization is left must be the culprit.  – Sherlock Hosk

Be a finisher

Don’t give up. Every problem you fix is a step nearer to having a new working Dev environment.

Step back from the task and have a break.  This allows you to view problems from a different perspective, giving fresh insights, providing new solutions.

It’s amazing how an impossible problem late one day, is obvious when you start with a fresh mind the next day.

Problems are often solved with clear thinking and not brute force and continued bashing away.  It’s easy to get involved in setting up an environment/instance,  using effort instead of brains.

Difficult tasks is like navigating a maze, sometimes you need to stop, refocus and realise you have gone down a wrong path.

Don’t suffer in silence

Some developers suffer in silence, other suffer loudly with plenty of swear words :)

If you get stuck and can’t resolve the problems then try explaining them to a cardboard developer.

This works by explaining the problem to yourself/cardboard developer you are analysing and thinking logically.  You are giving your brain time and space to think about the problem.

If you are not making progress then it’s time to ask for help.

Most developers don’t mind helping a fellow developer if they can see the developer has tried lots of solutions but is still stuck.  Developers are not so willing to help a lazy developer.

Suffering in silence helps no one, you get frustrated, and the task doesn’t get done.

Part of the job

Setting up new instances or dev environments is a task which isn’t fun or exciting but it has to be done.

It’s in the list with importing solutions to different environments.

It’s better to leave these more manual, less creative tasks to the afternoon when you have depleted your energy, enthusiasm and will power levels.

Hosk’s Top CRM Articles of the week – 13th October

I have been writing performance test scripts for Microsoft Dynamics CRM 2013 over the last week.  I now realise the reason for the lack of blogs posts and information on performance testing with Dynamics CRM.  I am using Visual Studio 2013 ultimate Web Performance and load tests and its frustrating, slow, difficult.

The main difficulties arise from the number of guids used in CRM.  To move the scripts from one CRM organisation to another, all guids need to be parameterised.

The CRM WRPC token stops scripts rerunning.  I took the easy option and turned off the token, instead of parameterising the token.  Read more here – What is the WRPC Token?

Microsoft released the CRM Performance toolkit, backwards compatible with CRM 2013.  The performance toolkit tests the default entities in CRM.  The good news is its a free performance testing tool, the bad news is its complex, making it difficult to change it to test your custom entities

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

CRM professional for hire

Hosk CRM Blog reader and CRM Professional Zsolt Zömbik is available for work now.

Why you should Zsolt

  • He reads Hosk’s Dynamic CRM blog
  • His name score extremely highly in scrabble
  • He has beaten Chuck Norris in an arm wrestle
  • When he runs over puddles, it doesn’t even ripple
  • He aims to be the first Microsoft Dynamics CRM professional to do a CRM deployment on Mars!

 One final point, he is ace at CRM.

Quote(s) of the week

The problem with troubleshooting is that trouble shoots back.” – Author Unknown
“Everything is theoretically impossible, until it is done.” – Robert A. Heinlein

People are born; leaders are made.
General Stanley McChrystal

Hosk Wisdom

People are born, CRM developers are made through knowledge of the CRM SDK and CRM project experience – Hosk

Article the week

become a CRM master 

Great concise blog with good advice to improve your CRM developers skills

Best of the Rest

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

Creating realistic test data for you project is great.  Create once, use many times.

Bad data can cause bugs

Good data can find bugs

XRM Strikes Back

Good article from CRM MPV Jukka about XRM

CRM Dialog and Custom Workflow example

An example of with a Dialog working with a Custom Workflow

Real time workflow or plugins

Scott Durow explains how Real time workflows work, comparing them to plugin performance

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

I deployed a Custom Workflow but CRM wasn’t using it, find out why

How to remove dependencies to CRM Developer Toolkit

How to extract your customizations from the steel ninja grip of the CRM developer toolkit

Upgrading to Microsoft Dynamics CRM 2015? Here’s What You Should Consider

Things not to miss when deciding to upgrade to CRM 2015, things like, has your CRM become a beast!

Dynamics CRM How to access a QuickForm component via Jscript in Turbo Forms

I’m not sure why you would but here’s how

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

WRPC token is generated every 24 hours to stop cross-site scripting, I bet you didn’t know that.

Using Actions in Microsoft Dynamics CRM 2015

I’m still not convinced by Actions in CRM. I keep reading articles thinking this time it will make sense

Read why Microsoft brought Adxstudio and why it’s good news

CRM 2013 – Understanding Solutions and how they work

Solutions in Microsoft Dynamics CRM give with one hand and bash you over the head with the other

Microsoft Social Engagement 2015 Update 1.2 is ready!

Social engagement continues to improve (which it needed to), check out the new functionality

Don’t just test the happy path

Developers should test the happy path, alternative path and the exception path otherwise you are giving bugs a place to hide

Case study featuring Unified Service Desk

The Unified Service Desk is awesome, why don’t more companies use it?

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

How to find Javascript files used in Microsoft Dynamics Forms

Find those pesky Javascript files

Get next case functionality for Dynamics CRM

Interesting read


how to be awesome part 1

Document integration – part 1: some ideas…

A Toolbox of Software Architecture Review Techniques. Part 1: The simplest thing you can do

What Led Amazon to its Own Microservices Architecture


morning pages – how to write them

Why you should write morning pages

How Con Artists Exploit Human Behaviour

16 Great Quotes For Software Testers

Shut Up, Sit Down, and Type

Previous top picks

Hosk’s Top CRM Articles of the week – 28th 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

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.


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