The Hosk is a Level 8 CRM Wizard Rockstar

Yes, I have finally made it to Level 8 Microsoft Dynamics Community badge.

Check out the text which accompanies this badge

Level 8

I am the 17 person in the Dynamics Community to earn this prestigious badge.

Click the link to see my fellow level 8 badge holders


What are Microsoft Dynamics Badges

If you don’t know what I’m going on about then read my previous blog post on badges

What are Microsoft Dynamics Community Badges and how to get started collecting them


So what benefits do you get for being a level 8

Good question, there are two ways to view it

You get absolutely nothing


You get the respect from your fellow Microsoft Dynamics users because you own a level 8 badge!


hmmmm, when I write it down it doesn’t sound quite as marvelous

It’s more a bonus side effect to posting blogs, answering forum questions and doing other CRM community type things.


Forum questions

I have learnt a lot from answering peoples CRM Forum questions and reading answers from Scott Durowand particulary Aileen Gusni who has written some of the most comprehensive answers to questions I have ever read.

It’s useful when people respond to the same question you have answered with a different solution because one of the advantages of Microsoft Dynamics CRM is there is lots of ways to do the same thing.


New Functionality

Answering and reading forum questions is a good way to see how new functionality is being used, what users don’t understand and how it can be used to answer users problems

Common problems

Answering forum questions is a good way to see the common problems with people using CRM 2013


Blog ideas

I sometimes get blog ideas from a good forum post like this

What is CRMUG? Should you join?




How to check what products are Compatible with different Microsoft Dynamics CRM Versions

Someone asked if  Microsoft Dynamics CRM 2011 was compatible with SQL Server 2012 SP2, now this is quite

Many people mistakenly (initially) think all Microsoft products will be compatible with each other because they are the same company.

The reality is most of the Microsoft products are great big teams working separately.  When a new product version come out, Microsoft internal teams probably have early access but it still takes time to fix and test different versions to give them the official compatibility stamp.

Customers want the stamp, you want the official stamp

Unsurprisingly Customers and all companies would like the official Microsoft compatibility stamp because then if there are problems Microsoft endeavours to fix them, if Microsoft hasn’t given the official compatibility stamp then you don’t know how long Microsoft will take to fix it.

They can be made to work

When a new version of SQL Server or patch is releasd you will often find the Microsoft Dynamics CRM community will soon try and install CRM on it (I don’t believe anyone has got it working with a raspberry PI yet but it’s surely only a matter of time).

They often find with a bit of pushing, pulling and brute force you can get incompatible versions working.

This is possibly acceptable for development environments but don’t take it any further because you might find yourself with a solution which is based on some new functionality which will then fail when you move that solution to older versions of the software.

How do I check compatibility

Microsoft Dynamics CRM uses a number of different products to make it work, Microsoft Dynamics has lots of different versions the infrastructure software has lots of versions, IE has versions, Outlook has version, everything has versions.

A popular question is usually can a customer’s server be used to Host an on premise CRM, what versions of the various software will they need to have.

Popular compatibility questions

  • What version of software SQL Server, Windows Server, IIS, IE,etc, etc will work with Microsoft Dynamics CRM
  • Does the new version of SQL Server 2012 work with Microsoft Dynamics CRM.
  • When will new version of software be compatiable
  • how long will IE 6 be supported (some customers really loved IE 6!)

Compatibility with different version is changing all the time and I have found the best place to check if a software version is compatible with your version of CRM is using the link below

Compatibility with Microsoft Dynamics CRM

It has the compatibility for each supported version of Microsoft Dynamics CRM

Compatibility with Microsoft Dynamics CRM 4.0 

Compatibility with Microsoft Dynamics CRM 2011 

Compatibility with Microsoft Dynamics CRM 2013 

 NO Microsoft Dynamics CRM 2015 yet

If you click on one of the links you get the details for that product.  Not just types but versions, here is the CRM 2013 list.  You see what version of CRM is compatiable with the software CRM installations use.

Microsoft Dynamics CRM 2013

The following products have been tested or are currently being tested for compatibility with Dynamics CRM 2013. The Minimum CRM version and CRM build number fields list the minimum Microsoft Dynamics CRM version that has been tested and that is compatible with the listed product.

Product Minimum CRM version CRM build number Status
.Net Framework 4.5.2 Update Rollup 2 Compatible
Active Directory Federation Services in Windows Server 2008 (AD FS 2.0) RTM Compatible
Active Directory Federation Services in Windows Server 2008 R2 RTM Compatible
Active Directory Federation Services in Windows Server 2012 RTM Compatible
Active Directory Federation Services in Windows Server 2012 R2 RTM Compatible
Azure virtual machines (support for Microsoft Azure virtual machines) Not Compatible
CRM 2011 for Outlook Client Update Rollup 12 5.0.9690.3236 Compatible
Exchange Online RTM Compatible
Exchange Server 2000 Not Compatible
Exchange Server 2003 Not Compatible
Exchange Server 2007 Standard RTM Compatible
Exchange Server 2007 Enterprise RTM Compatible
Exchange Server 2010 Standard RTM Compatible
Exchange Server 2010 Enterprise RTM Compatible
Exchange Server 2013 Standard Update Rollup 2 6.0.0002.0043 Compatible
Exchange Server 2013 Enterprise Update Rollup 2 6.0.0002.0043 Compatible
IIS 7.0 RTM Compatible
IIS 7.5 RTM Compatible
IIS 8.0 RTM Compatible
Internet Explorer 8 RTM Compatible
Internet Explorer 9 RTM Compatible
Internet Explorer 10 RTM Compatible
Internet Explorer 11 Update Rollup 2 6.0.0002.0043 Compatible
iOS7 Safari on iPad (web application) Update Rollup 2 6.0.0002.0043 Compatible
iPad Air using Safari (web application) Update Rollup 2 6.0.0002.0043 Compatible
iPad Air using CRM for Tablets Update Rollup 2 6.0.0002.0043 Compatible
Microsoft SharePoint 2010 SP1 (all editions) RTM Compatible
Microsoft SharePoint Foundation 2013 RTM Not Compatible
Microsoft SharePoint 2013 RTM Compatible
Microsoft SQL Server 2000 Not compatible
Microsoft SQL Server 2005 Not compatible
Microsoft SQL Server 2008 Workgroup Not compatible
Microsoft SQL Server 2008 Web Not compatible
Microsoft SQL Server 2008 Compact (CRM server) Not compatible
Microsoft SQL Server 2008 Express (CRM server) Not compatible
Microsoft SQL Server 2008 Standard SP3 (x64) RTM Compatible
Microsoft SQL Server 2008 Standard R2 SP2 RTM Compatible
Microsoft SQL Server 2008 Enterprise SP3 (x64) RTM Compatible
Microsoft SQL Server 2008 Enterprise R2 SP2 RTM Compatible
Microsoft SQL Server 2008 Datacenter SP2 (x64) RTM Compatible
Microsoft SQL Server 2008 Datacenter R2 SP2 RTM Compatible
Microsoft SQL Server 2008 Developer SP3 (x64) RTM Compatible*
Microsoft SQL Server 2008 Developer R2 SP2 RTM Compatible*
Microsoft SQL Server 2012 Enterprise SP1 (x64) RTM Compatible
Microsoft SQL Server 2012 database engine Not compatible
Microsoft SQL Server 2012 BI SP1 (x64) RTM Compatible
Microsoft SQL Server 2012 Standard SP1 (x64) RTM Compatible
Office 2013 C2R (stand-alone)(Cached-Exchange Mode Only) RTM Compatible
Office 2013 C2R (side-by-side with Office 2010)(Cached-Exchange Mode Only) RTM Compatible
Office 2013 SP1 (Cached-Exchange Mode Only) Update Rollup 2 6.0.0002.0043 Compatible
Office 2013 SP1 with CRM 2013 SP1 (Cached-Exchange Mode Only) Service Pack 1 6.1.0000.0581 Compatible
Windows 8.1 Update Rollup 2 6.0.0002.0043 Compatible
Windows 8.1 w/ update KB2919355 (web client only) Update Rollup 3 6.00.0003.0106 Compatible
Windows Server 2003 Not compatible
Windows Server 2008 Standard SP2 (x64) RTM Compatible
Windows Server 2008 Standard R2 SP1 RTM Compatible
Windows Server 2008 Enterprise SP2 (x64) RTM Compatible
Windows Server 2008 Enterprise R2 SP1 RTM Compatible
Windows Server 2008 Datacenter SP2 (x64) RTM Compatible
Windows Server 2008 Datacenter R2 SP1 RTM Compatible
Windows Web Server 2008 Datacenter SP2 (x64) RTM Compatible
Windows Web Server 2008 Datacenter R2 SP1 RTM Compatible
Windows Server 2012 Foundation Not compatible
Windows Server 2012 Essentials Not compatible
Windows Server 2012 Datacenter RTM Compatible
Windows Server 2012 Standard RTM Compatible
Windows Server 2012 R2 (CRM server) Update Rollup 2 6.0.0002.0043 Compatible
Windows Small Business Server

NOTES – Not supported

There is also an important little section at the bottom of the compatibility pages called notes.  This has information about things which are not supported, once again I will use the CRM 2013 as an example


  • 32-bit versions of Microsoft SQL Server 2008 and Microsoft SQL Server 2012 Reporting Services are not supported.
  • Microsoft SQL Server 2008 Workgroup is not supported for running the Microsoft Dynamics CRM Reporting Extensions.
  • Running a Microsoft SQL Server 2012 Reporting Services server in SharePoint mode is not supported with Microsoft Dynamics CRM.
  • The CRM for Outlook client does not support Outlook configured in Online for tracking or synchronization (non-Cached Exchange mode)

CRM 2015 – Hosk takes a peak at the CRM 2015 SDK

I discussed why you should read the what’s new, I thought I would split it out of this blog post just in case you didn’t want to read all it but if you did

CRM 2015 SDK – Why you should read the What’s new for developers


Download Link

If you want to download the CRM 2015 SDK you can below, it also has the


Pre Release

one note of caution, this is a pre release document and things could change before the official release.  In practise this is unlikely and most of the functionality will stay the same, but it’s something to be aware of.

Compared to CRM 2013 SDK

My first impression it’s a lot less drastic than CRM 2013 SDK changes.  A lot of the changes in CRM 2015 don’t really feel like a major release but more continued enhancements of CRM 2013.

Personally, I think this is a good thing because it’s easier for developers, less of a shock for users (GUI changes and getting used to auto saving).

It has also allowed Microsoft to improve some of the functionality they added in CRM 2013. Business rules enhanced, Business process improved.

Not to mention they have finally added in some Microsoft Connect long time enhancement requests, like

  • Field level security for system entities
  • improved conditions for advanced finds


CRM 2015 SDK Overview

Below is the list you have probably seen most other blogs, it’s the high level list of CRM 2015 SDK Changes

  • Product catalog enhancements
  • Use hierarchical data
  • Apply hierarchical security models
  • Use calculated and rollup attributes created in Dynamics CRM
  • Write form scripts that interact with business process flows
  • Use field-level security with system entities
  • Create business rules instead of writing code
  • Add custom help content
  • Use two-factor authentication
  • New messages in the Organization web service
  • New messages in the Deployment web service
  • New entities
  • New privileges
  • New NuGet packages


Let’s have a little peak around some of the new functionality and give you the Hosk first impression.  Some of the content below has been copied from the CRM 2015 SDK.  You will notice my bits because they will be bits with bad grammar and spelling.

The comments were notes I came up with whilst reading the CRM 2015 SDK, they are not in any particularly order

Product Catalog enhancements

There seems some major functionality added to the Product Catalog

CRM bundles are depreciated and you should use bundles instead!   So it seems you group products into bundles, which also allows you to discount bundles.

Functionality has been added so you can create related products.  This means you can have substitutes, cross sell, or up sell.  The SDK says related products will be displayed as suggestions in opportunities, quotes, orders and invoices.

The SDK also states you can use Custom pricing instead of CRM pricing.

Localized values for certain product properties.  I didn’t know this wasn’t already in.


There are some interesting samples, which give a great indication of what you can do with products

Sample: Clone product records

Sample: Add products to a bundle

Sample: Calculate Price plug-in



Hierarchical Data

Hierarchy is one of the major enhancements in CRM 2015, so it’s not surprisingly, there is quite a bit in the SDK


Identify and edit hierarchical entity relationships

Each entity can have just one self-referential one-to-many entity relationship that is considered hierarchical


There is a method called OneToManyRelationshipMetadata, so it would seem the hierarchy information is held as metadata.


GUI and Code methods to change hierarchy data

All of these settings can be configured using the customization tools in the web application without writing code, but developers can also define hierarchies pragmatically using metadata APIs or query the metadata to understand which entity relationships are considered hierarchical.

It’s interesting because I wasn’t expecting so many methods to adjust the hierarchy in the CRM SDK, I can’t quite see the need for doing it pragmatically but things usually come clearer when you start to use the new functionality.


Two interesting sections regarding hierarchy

Apply commands to hierarchy visualizations

You will be able to navigate the hierarchy data but the Ribbon button will change to allow you to use some commands on the data.

Apply hierarchical security models

new security model to allow people to view the hierarchy settings


How hierarchical security can be used to control access to entities in Microsoft Dynamics CRM

The hierarchy security model is an extension to the existing Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update security models that use business units, security roles, sharing, and teams. It can be used in conjunction with all other existing security models.


there is also something called Position hierarchy, which is associated with job position hierarchy, this is done using the new position entity.

hierarchy is a useful enhancement because it’s common request from users.  I didn’t think it would be complex but reading the CRM 2015 SDK it sounds tricky.


Calculated and rollup attributes


Calculated and rollup fields will be read only and calculated by a system user account.  The attributes will inherit from AttributeMetaData


All attributes that inherit from AttributeMetadata have a SourceType property that can contain the values shown in the following table.

Value Description
null Not a valid type of attribute to be a calculated or rollup attribute.
0 Simple attribute. The attribute isn’t defined as a calculated or rollup attribute.
1 Calculated attribute
2 Rollup attribute

Reading the SDK on the Calculated and rollup attributes it seems quite complex with various classic CRM quirks


here are the limitations of calculated and rollup fields


Rollup attributes can’t be used as a workflow event or wait condition. These attributes don’t raise the event to trigger workflows.

The ModifiedBy and ModifiedOn attributes for the entity aren’t updated when the rollup attribute is updated.

A maximum of 100 rollup attributes can be defined within an organization. Each entity can have no more than 10 rollup attributes.

rollup attribute formula can’t reference another rollup attribute.

rollup attribute formula can’t reference complex calculated attributes. Only calculated attributes that reference simple attributes in the same record can be used with rollups.

rollup attribute formula can’t include records in many-to-many (N:N) relationships. It can only include records in one-to-many (1:N) relationships.


Business Rules Enhanced

Business rules allow Or and IF Else statements in the condition

A big change to Business rules is they  will be able to run on the server.  Currently business rules can only run on the client (web browser, tablet, outlook) but this means the business rules are not triggered when the entity data is changed via a plugin or import but being able to specify a business rule to run on the server will

Custom help

very useful but developers don’t like writing help or manuals, so I will say nothing about it.


Two factor authentication

This one sprung up from nowhere but what is it for I hear you ask.


This section already has a web page for it


it will allow you to ask for another proof of identity


  • Something known (such as a password or PIN)
  • Something possessed (such as a smart card)
  • Something unique about the user’s appearance or person (such as a fingerprint)

The main supporting service is exchange online, which makes me wonder where this actually gong to be used.


New messages in the Organization web service

some which I thought were interesting

Request class name Description More information
CalculatePriceRequest Defines custom pricing for your products in opportunities, quotes, orders, and invoices. Use custom pricing for products
CalculateRollupFieldRequest Calculates a rollup attribute value on demand. Rollup attributes
CloneProductRequest Clones a product family, product, or bundle record, and creates a copy of the record under the same parent node. Clone a product family, product, or bundle


New messages in the Deployment web service

These are very interesting, you can delete an organisation and add an organisation from a database backup!


Request class name Description
AddCrmDatabaseRequest Adds a CRM database to your deployment from a database backup or from a detached database.
DeleteOrganizationRequest Deletes a CRM organization.
RetrieveMonitoringResultsRequest Retrieves results from the monitoring service operation tests for your CRM deployment.
RetrieveUserMappingRequest Retrieves the mapping information of existing users in a CRM organization.

Finally this one

RetrieveCurrentOrganizationRequest Retrieves organization information from the organization service rather than the discovery service. Retrieve organization information from the organization service instead of using the discovery service.


So there you go, a quick whizz through some of the new functionality in the CRM SDK

CRM 2015 SDK – Why you should read the What’s new for developers

The new CRM 2015 SDK was released this week and it got me thinking about how useful the What’s new for developers section is and why everyone should read it.

You can download the SDK here

I take a quick peak at the new functionality in the CRM 2015 SDK in the blog post below

It’s always useful to know what changes are coming down the pipe in CRM, some of which you might use to create solutions in the future with.  For CRM Developers/Solutions architects it pays to have a good idea of the new functionality in new releases, even if it is merely a basic understanding

Here are some more reasons why I think it’s important to read the what’s new for Developers in the CRM SDK.

Developers point of view

This is a completely different list of items than the many blog posts talking about new user functionality, things like improved  if statements in business rules, hierarchical data, custom help. The point of the SDK and the what’s new for Developers is to give CRM developers an overview of the new functionality and the new cool tools and methods you are about to get hold of.

It also includes new back end changes, depreciated methods, new methods.

Do it now

If you don’t look now then the chances are you only look when you have to start developing with CRM 2015.  If you have a look at the SDK now you can start to get an idea of what new functionality there is and how it works.  Once you know about new functionality you can then start to think about how you and your customers can use it.

What doesn’t work

Often the what’s new for developers will also tell you what will stop working in the new release. This is very important information for people upgrading customizations, sometimes the information could give you a heads up that the upgrade will be difficult.

it will also give you an idea if after upgrading your customizations, if things are not working and you are not sure why, check the SDK.

e.g. removing CRM 4 endpoints
Read optimized forms removed (ok no one noticed this one)

More Knowledge = More Pay

Development and being developer can be odd. Often developers are collaborating with other developers on projects and developers work in teams and share knowledge with Online communities.

From a personal view are you are also in competition with your fellow developers for better raises and better development jobs. In this sense it pays to stay ahead.

Continuous learning, keeping up with the latest functionality, you increase your chances of being a better developer/better informed developer who will hopefully make more informed development decisions.

In certain situations, using new functionality can save you lots of development time and/or change your development design

Understand how the new functionality is implemented

We have all read articles on the new CRM 2015 functionality but who can remember that this week. Glancing at the list of

Back end changes

I noticed they have added two-factor authentication and new methods organization web service.
New deployment web service methods, you can delete organisations!

These changes aren’t linked to big headline functionality but subtle dev user changes
Changes in the SDK, behind the scenes

Microsoft often sneak useful enhancements not related to new functionality. Things like new plugin registration tool in CRM 2013 service pack 1

Asynchronous solution import in CRM 2013. This is potentially very useful because it would allow you to import solutions without disrupting the CRM performance.
getUsername in CRM Javascript API

Paying ahead

Learning a bit now will mean you have less to learn later on.

Always learning

Always learning is a state of mind, good developers are always curious how things work, the new useful functionality added.

Good developers are always looking to improve their code, improve their solutions and one of the main methods is looking to optimize code, an easy way to do this is to utilize the new functionality

Good examples

Some people may criticize some of the implementation of new functionality but Microsoft have lots of great developers. Reading the SDK/ new functionality, often gives me ideas of how to structure code/solutions that I am working on.

Good development, implementation can often give me ideas for code I am working on now and in the future, which I then of course rebrand as my own brilliant idea.

Find retired/depreciated methods

Microsoft SDK’s often give with one hand and taketh with the other hand. Usually when the depreciate functionality, it’s because they have replaced with something better/different.

It’s a very good idea to know what methods are deprecated/depreciating because this could effect current code and code you will upgrade to the SDK version.

Better understanding

I view knowledge as a 3 dimensional. You need to view knowledge from different angles to understand how things work e.g. Customer view/GUI/Development view

When you see the methods available for the new functionality, you can start to see how you would implement it.

Implementation ideas

When you read what methods and functionality is available you start to imagine how you would use it. Hopefully your brain will tuck this information away and bring it forth when you need it later.

It may be useful for a current customer

When I read new functionality I am always thinking how it would benefit current customers or how it could be applied to projects I have worked on.

It’s possible it could provide justification for a current customer to upgrade their CRM solution to the new version.

You always find things you didn’t know

Reading the CRM SDK can be boring, sometimes can be overwhelming (it’s a huge document) but I usually find it fascinating. Just thinking about all the work that has gone involved but also I think about possibilities that come with new functionality.

I find looking at the CRM SDK is a bit like surfing the internet, you soon get lost down some part you have never seen or find useful sections you haven’t read for a while.

Better prepared

Ultimately, you will be better prepared for when you do start creating solutions in CRM 2015

What is CRMUG? Should you join?

You may have noticed CRMUG pops up quite a bit in the world of CRM.

I often see things on twitter pop up CRMUG related.

Recently I saw CRM MVP Gus Gonzales  giving out some CRM black belt armbands


CRM MVP/Guru Adam Vero publicisng the next UK meeting.


Why is Hosk blogging about CRMUG

I have often wondered what is CRMUG and what are the benefits of CRMUG are, what CRMUG does and why would people join.

For a company to join it costs you an annual fee (I think based on your size).

You can go to the CRMUG website and it will sell you some benefits

CRMUG benefits


There is some also some information on the CRMUG site

about us…/about



Forum question

Then today this forum question popped up on the CRM Forum.


CRMUG worth joining?

Wanted to know if anyone could give me some input on whether or not a membership to CRMUG would be beneficial to someone just getting started. I tend to ask a lot of questions, which you can tell if you view my profile. Basically what would I get that I can’t get on these forums?


This forum post prompted some very good responses, which I thought would be useful to highlight the forum post on the Hosk blog because I’m sure if I have wondered about it, then many other users who read the blog will have and one answer from Adam Vero was really good



Selected Forum Answers

Before you read the answers you should know CRM MVP’s get free membership to CRMUG and Adam Vero is a chapter lead.

I am not a member of CRMUG


First an answer from CRM MVP Scott Durow

Scott Durow responded on 27 Oct 2014 5:53 PM

Hi Nick,

I’d highly recommend joining CRMUG for many reasons, but if  I had to pick one that differentiates from the forums it would be that you get to meet fact-to-face people that are in similar positions to yourself and learn from each other. Forming these kind of networks face to face is invaluable.

For more info see



Adam Vero responded on 27 Oct 2014 8:37 PM

CRMUG has several things going for it, even as a free “associate” (rather than a paid up member):

access to their own forums which a whole bunch of people collaborate in, who may not visit other web forum sites

in particular, their forums often get great answers to questions which are more opinion based, ask for people’s experience with different approaches, or looking for insider knowledge of using CRM for the business needs of particular vertical markets

you will find out about in-person meetings in your area (although depending on the particular “chapter” these may or may not be free to non-members), where you will be able to join in discussions, technical sessions, round tables and more generally network with your local peers. Chapter size varies widely from a dozen or so people who get to know each other very well to 60, 70+ where things are not so intimate but you may get more content (since most content is member-generated, a larger group has more people to draw on).

find out about free online webinars where other members deliver great content and/or “ask the experts” sessions where the main point is to have an interactive audience discussion.

Paid up members get more benefits:

free attendance at local chapter meetings, and discounts for larger events such as the annual Summit (attended by over 650 people this year, with 180 sessions to choose from across 3 days)

access to all online events (only selected webinars are free to non-members)

access to the library of recorded online sessions, so you have a huge back catalog of learning to work through straight away

Lots of online and in-person events are presented by MVPs – there were 21 of us at CRMUG Summit in St. Louis two weeks ago. As well as presenting content, there were various panel sessions for audience questions on specific topics, as well as very general “Ask the MVPs”. There was also a “medic desk” for anyone to bring their CRM questions and get answers from a range of MVPs and other expert peers. If you have questions, there are plenty of opportunities to get them answered!

You can join CRMUG at – if you fill in your email address and complete a user profile and password at the first stage you will be signed up as a free “associate” member.

If you proceed to paid membership you will need to provide more details and choose a payment option. Membership costs vary according to size of your organization, but it is a single membership per company for as many named individuals as you need.

I think your nearest chapter at the moment could be Atlanta, Georgia:…/community-home

There are several chapters in Florida which might be as easy to travel to (eg flights at better times), as well as in Philadelphia (for any colleagues based out of your Pennsylvania offices)

Disclaimer: as chapter lead for CRMUG UK I may be slightly biased, but 13,000+ member users can’t be wrong!




So I hope that gives a bit of information about CRMUG, I think the main benefit is the face to face meetings with fellow CRM enthusiasts and CRM experts like Adam and Scott.

CRM 2013 – Business rule workings, limitations and Exam Notes

Business rules were a new feature added into CRM 2013, so this means there will definitely be a few questions on business rules on the MB2-703 exam.

Business rules have a few quirks to them and I think you will find how they work interesting.

If you want to learn how business rules work, read my previous article on business rules

CRM 2013 – Understanding Business Rules

The notes below primary use is to study for the exam but they are also useful for understanding all the workings of business rules and their limitations

for my other exam notes and study information go to the link below

MB2-703 – CRM 2013 Customization and Configuration Certification

Business Rule Exam Notes

Business rules allow a user with no programming skills to create conditional logic, form validation and functionality normally only available using Javascript.

Business rules actions are

Show/Hide fields – Field visibility

Set business required attribute

Display error messages

Business rules can apply to all

Lock or unlock field

Set field values

  • Business rules are split into separate sections, the condition is evaluated and the actions is the instructions to run.
  • You can only modify business rules when they are in draft mode (like workflows)
  • You cannot save a record whilst a business rule error is being displayed, e.g. it prevents the record being saved until the error message is resolved
  • Business rules are often referred to as portable business rules because business rules work in the browsers and CRM for tablets/phone applications (e.g. portable and everywhere)
  • Business rules are client side, they run on the form (unlike plugins, workflows which are server side)
  • Business rules can run on multiple forms for an entity or specific forms for an entity.
  • Each individual form can have zero, one or multiple business rules
  • Business rules can run when a form is loaded or when a field value changes (causing the condition to be evaluated)
  • Saving a record will not run the business rule again
  • Business rules conditions are checked onload and when the field changes. The conditions are evaluated and if the conditions are met the business rule actions will be
  • Fields referenced in a business rule condition or action MUST be displayed on the form or the business rule will not run.
  • Business rules which don’t run due to fields not included on the form will not cause an error, it just won’t run.
  • CRM Tablets display the first 75 fields on a form, so business rules will only work for tablets based on fields in the first 75 fields on a form.
  • Business rules have a status of Draft and Active
  • Business rules when created start with a status of draft.
  • Activating a business rule will change the status to Active. You cannot edit the rule in an active status
  • Deactivating a business will change the business rule status to draft. You can edit the business rule in draft status
  • CRM 2013 business rules conditions work only with AND status and not IF. This means if you want to reverse an action you need two separate business rules (e.g. one business rule to hide a field and another business rule to display the field)
  • Descriptions in business rules are optional
  • Business rules cannot run only for Quick Create forms
  • Business rule scope All Forms will result in the business rule being applied to all forms of a type Main or Quick Create.
  • To change business rule scope, the business rule must be draft status.
  • Actions cannot apply to fields from related entities.
  • Actions can only apply to entities on the entity.
  • Preview mode allows you to test business rules whilst the business rule is in draft mode
  • Conditions are evaluated and all conditions must = TRUE for the business rule action to run.
  • You can have one or multiple conditions in a business rule
  • In CRM 2013 business rule (at time of writing) conditions are AND conditions not OR conditions.
  • You cannot save a record whilst the business rule error icon is displayed
  • When a business rule changes the value of a field it will not trigger the fields OnChange event
  • A field can be set to Not Business required and business required.
  • You cannot set a field to be business recommended
  • Business rules can show or hide a field
  • Business rules cannot show/hide sections or tabs
  • Business rules can lock (read only) or unlock (editable)
  • You cannot delete an active business rule.
  • You can only delete business rules in draft status (e.g. business rules which have been deactivated)
  • Business rules run only when the form loads and when field values change. They do not run when a record is saved.
  • Whole Number fields that use the formats for TimeZone, Duration, or Language will not appear in the rule editor for conditions or actions, so they cannot be used with business rules.
  • Business rules can be added to solutions
  • Business rules will only execute on the form, so don’t work with bulk updates, plugin changes
  • You cannot clear a field using business rules
  • Business rules work on all entities, default and custom
  • You can quickly copy a business rule by using Save As
  • Business rules are run in order of activation e.g. Oldest to Newest
  • Running order – System Javascript, Custom Javascript and then Business rules
  • Business rules only run for specific entity (similar to workflows), you cannot have multiple entity business rules.
  • You cannot delete a field used in a business rule, until you delete the business rule
  • Business rules run on all clients, Web Client (all browsers), Outlook client (offline and online) and CRM for Tablets (surface and iPad)
  • Javascript OnChange event handlers are not triggered if a field value is changed by a business rule.
  • You cannot call a Javascript method from a business rule
  • You cannot delete a field if it’s used in a business rule

CRM 2013 – Opportunity associated view not showing the opportunities?

A loyal blog follower emailed me with a question about how to create an advanced find to show opportunities for a specific contact.

Question for the Hosk

I thought I’d email you as I have a completely annoying thing I’m trying to sort – but I cannot work out what I’ve got wrong. Also, I’m sure I was resolved this last week by selecting POTENTIAL CUSTOMER Account plus POTENTIAL CUSTOMER Contact . Problem is, I can’t find that option now. It’s driving me mad!

Anyway, what I am trying to do is create a view of all Opportunities linked to a specific contact. So, I navigate to the contact & hit the drop down in the banner – but no Opportunities are displayed:

Contact has no opportunities

At first I thought it was user error but I could quickly recreate the problem with my CRM 2013 online trial

Here are my opportunities

all opportunities

I am going to use the contact Maria Campbell

Here is the opportunity with her on

the opportunity

if you then click on Maria and go to opportunities, you get this screen and it shows no opportunities, even though I just came from an opportunity with the user on!!

no opportunities

I looked at the Opportunity Associated view and it didn’t have any filter criteria, so I couldn’t see how it was filtering the opportunity out

I decided to add an opportunity to see if it would add and that opportunity was visible and that opportunity was displayed???

but I couldn’t see how it was filtering

hosk opp shows

I checked to make sure the opportunity records were the same and all the key data is the same

compare both

So I created an Advanced find using opportunities with contact equals Maria Campbell and both opportunities are returned

contact advanced find

If I change this to Potential Customer (Contact) then only one row – the new one I added is returned

potential contact advanced find

here is the fetch XML

customer which shows both

xml contact advanced find

Parentcontact which filters out original opportunity

xml potential contact advanced find

I looked at all the fields on both opportunites and can see potential customer is different

potential customer

What is Potential Customer?

Potential customer is a secret field which doesn’t show on the opportunity fields (I couldn’t find it).  I believe it to be a Customer field (e.g. it holds account or contact entities) and it gets automatically set depending on where you create the opportunity from.

To prove this point I would add an opportunity from the Account and then select Maria as the contact

Then I would add a new opportunity from the contact Maria and see what the potential Customer comes out as

As you can see below, when you add from an account the potential customer is the account and it’s the contact when you add from the contact record.

all four showing

So now we know the secret potential customer field it makes sense what is displayed but it doesn’t make sense it using a field we can’t alter

Opportunities for just contact

I wondered what would happen if I did a multiple edit and select the Contact and Account of Maria and Fabrikam Inc.  It turned all the potential customers to Fabrikam.

all fab

So I’m back to the position of no opportunities showing for the contact.  I tried just changing the contact but it didn’t budge the potential customer.

Is this a bug

This is tricky because it sort of makes sense but actually it doesn’t because it’s using the potential customer field, which is wrong because it’s filtering out records it should be showing

When you add opportunities directly contact record it will set the potential customer to the contact and then on the Associated opportunity view it will only show these records, even if there are opportunity records with that user as the contact.

For the account Opportunity associated view it will show all the opportunity records, even the opportunities which were added from the contact record and where the potential customer is set to the customer.

How to show the opportunities for the contact

This is now a tricky problem.  One solution is to make sure you go through the process of adding all opportunities via the contact to ensure it will appear on account and contact opportunity associated view.


Change the opportunity assocaited view to include the contact record, this would then allow you to view opportunities for the account, you will then have the ability to filter the contact column to only show the contact you want.

altered associate view

CRM 2013 Tool Review – Dynamics CRM Organisation Settings Editor

I was getting a timeout error when importing a solution (actually a whole bunch of errors but I won’t go into that now) and I searched the internet for the answer and came right back to my own blog, thanks Marvelous Hosk for writing that blog post

CRM 2011 – A time-out occurs when you import a solution in Microsoft Dynamics CRM 2011

The blog and KB article link said I should update the OLEDBTimeout value.  It jogged my memory to try out the The Dynamics CRM Organisation Settings Editor or OrgDBOrgSettings as it is known.

The tool was created by seanmcne who is a CRM Premier Field Engineer on the Dynamics PFE Team (I refer to as the A Team) and he has been working with CRM since 2004 and Microsoft CRM 1.0!!

The first thing I will add this tool has some great simple documentation.

What does it do

I will quote from the codeplex site for the project

This is a utility allowing admins of Dynamics CRM (2011/2013 – online & onPrem) to edit their organization database settings otherwise known as OrgDBOrgSettings

This utility allows you to edit your settings without the use of the command line utility in the KB article documenting “OrgDBOrgSettings.” The utility is written using the CRM SDK as a reference and currently all changes and retrieval of settings are done via the CRM’s OData Endpoint. The utility is provided as a managed webresource that can easily be installed and uninstalled from your CRM environment.

How is it setup

The project is a managed solution and only adds a few files.  You may add it, change the values and remove it

How do I use it

once you have imported the solution, go to solutions, click on the solution

Organization Settings Editor

Then here  click on configuration and this is where you can use the solution to change the DBOrg settings

Below is the screen you will see

What version of CRM

It will work with CRM 2011 and CRM 2013 and I should think it will continue to work with CRM 2015

Why is good

The reason why it is good because it means you can Add/Edit OrgDBOrgSettings without using a command line tool.

A really great piece of functionality is it links to the KBArticle, so you can understand what the change will do and why you might need to do it.

I also think it’s good it doesn’t have its own site map button because it means it just hides itself away.


For those of your sharp-eyed folk you will of course notice the OLEDBTimeout setting isn’t in the database – OrgDBOrgSettings it’s actually in registry of the CRM Server.

My article didn’t help because the timeout was already set to a large number and the web config httpRuntime maxRequestLength had been increased, so it’s back to the drawing board for this error

More CRM 2013 Tool Reviews

How to add your CRM 2013 server name to your hosts file

In your Dev environment/internal CRM environment you will often have big server names


it could be something like this


So then your CRM url is something like this


to make life a bit easier for yourself you can add the computer into your hosts file which will mean you can then use a smaller friendlier name




which would come out like this


first you need to get the ip of the server


type cmd on your start menu

open the command line tool

type ping and the name of the server


this should return the ip address


Now you need to edit the hosts file.  This is a proper old windows file and on Windows 7 I found it here

if you can’t see the hosts file you might need to make some files not hidden, follow this guide
Then edit the hosts file
ip SPACE new server short name
111.22.333.44 HoskDev01
You may need to open and save the record as administrator.  or copy the file to your desktop, change it and copy it back over
now you should be able to access crm using your friendly, shorter name

CRM 2011/2013 – System.InvalidCastException: Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type

I had an odd error today whilst developing and it turned out to be a very frustrating few hours.

I was writing a plugin which would work for Lead and Contact and because of this I was using a mixture of late binding and early binding.

The late binding was used because I was writing a plugin to fire on update and create of a lead/contact. It was working out the salutation. It was different entities but the same field names.

So I used Entity object and late binding to get the values of a 2 field, I was using these values to retrieve the data from another entity which was early bound.

My personal preference is to use early binding because I find the code is easier to read, it’s also a lot easier to  write because you can use intellisense to get the fields rather than looking at the exact field name.  The other benefit of early binding is you remove any syntax errors from run time and casting/conversion errors are found whilst compiling.


Casting error

It was working fine, my queryexpression was returning some records but when I tried to cast the records from Entity to my early bound entity I was getting

System.InvalidCastException: Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type…

Now this is a common problem people have had with early bound types

Usually to resolve the problem you need to add one of the lines below to say, yes – enable ProxyTypes for my CRMService (IOrganizationService)

_serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());

But looking at my code I could see I already had this


Duplicate Entities Reference

Then whilst building the project I was getting this error

Duplicate ‘Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute’ attribute

What the heck does this mean, more internet searching

This brought me to this page

and an answer from CRM MVP Gonzalo

Reference assemblies are not supported in CRM (at least officially) and they can always cause headaches, I strongly discourage them. What you can do is include the generated code from crmsvcutil.exe into each of your plugin assemblies and that should work. You can also include this line of code in your plugin assembly (which is included in the generated code):

It seems the problem was due to someone trying to reference Entities class from inside a dll and this doesn’t really work and a better solution is to add the entities class, so it’s included in the plugin dll (and you don’t need to go outside to another DLL to get the entities.class)

Visual Studio pointed me to this line with it’s error

[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()]

I then noticed I had two references to Entities (early binding file)

using Hosk.Dynamics.Crm..Entities;
using Microsoft.Xrm.Sdk.Query;
using Hosk.Dynamics.Crm..ContactLead.Entities;


Now things started to become clear, when I looked at the entities file before it didn’t have the entity I wanted so I regenerated the entities file using the CRM Developer toolkit.

The downside of using the CRM Developer toolkit to do this is it creates an entities file for all of them.  I did notice before there only seemed to be a small selection of the entities.

I then found there was a separate project with the crmsvcutil.exe, for those of you who don’t know what this is, it’s the command line tool Microsoft has created for creating the early bound Entities file.

I have used and written about this before


Only Create the Entities you need

The crmsvcutil.exe takes some config values which allows you to specify which entities you want to create early binding for.

You can pass some variables to the exe

<?xml version=”1.0″ encoding=”utf-8″ ?>

<add key=”o” value=”Entities.cs“/>
<add key=”url” value=”http://<CRM Server url/>CRMORGNAME/XRMServices/2011/Organization.svc“/>
<add key=”namespace” value=”Hosk.Entities”/>
<add key=”codewriterfilter” value=”BasicFilteringService,CrmSvcUtilExtensions”/>


Then a text file called EntitiesToBuild.txt and in this file were all the entities we wanted to build early bindings for.

This is great stuff, it’s efficient because it creates early bound data only need the early bound entities you use in the code.  Limiting the entities you create the early bound entities file will save you time creating/refreshing the entities file and reduce the size of plugin dll’s.

Missing References

I added in my entity, ran the crmsvcutil.exe but then suddenly I got loads of errors.  A previous developer had created the entities file but hadn’t updated the EntitiesToBuild so I was missing a bunch of entities which used early binding.

I added these entities in and then I got some error with fields missing.

One of the plugins was no longer being used and many of the fields it was using had been deleted.


Finally it compiled and I was up and running again, I had forgotten what I was actually doing.


Early Bound Generator

The solution for creating the early bound classes worked, there is now a tool which can do it for you, so you don’t have to spend any time using the crmsvcutil with the command line.

The tool is the Early Bound Generator and has a nice GUI interface for you, I have reviewed it on a previous blog/video

here is a link to the codeplex site


The tool has been  improved since my initial review.  I will also proudly add the Hosk CRM blog is the link which brings the most traffic to the codeplex site and mentioning it here may even send a bit more traffic towards over that way, not to mention I love CRM tools.

If you want to see the other CRM tools I have reviewed click the link below


Why should I care about this error

It’s true you probably won’t get the error in the same scenario as above but it’s useful to know about this casting error and the cause.

If you ever see errors about casting Microsoft.Xrm.Sdk.Entity type to a custom entity type then you know there is some problem with the entities file.

Often the problem is the entities file is not up to date/not the latest version as I discussed in the blog post below earlier this week

Error – the source file is different from when the module was built

So as soon as you see this error, you know it’s an early bound/Entities problem.

%d bloggers like this: