More About This Website

All information is provided "AS IS" with no warranties, and confers no rights

Powered by Squarespace

Fast Path to Views and Records

You’ve probably figured out one of the things they’ve done in CRM 2011 is reduce the amount of clicks to get to things.  Here’s one that you might not have seen yet.  If you look at your sitemap you will see the usual suspects Account, Contacts and whatever else you have hanging around there. It probably looks something like the following if you haven’t changed it a bunch:

image After Mouse Over image

See that little arrow to the right side of the Accounts item?  Click right there and you now see the following


So quickly you can Create a New Record, Go to a Specific System or Personal View and navigate to recently viewed records.  Those are all specific to the entity that you clicked on.  You can get global recently viewed and even pin them by looking here:


Notice the little push pin to the right of each item.  Using this you can pin them to the list.  This has the obvious use for the sales people to pin their 5 accounts they are assigned but it also can be used for any other record type so I think it has value for most people using CRM.

What’s your favorite feature in CRM 2011 that others might not have discovered?


OData/Silverlight–Issue with Relationships

A little while back I blogged about how when using the default behavior of OData from Silverlight all properties are sent with each server update by default.  I also included in that blog post a link to the CRM Team blog post with a work around you can find that here.

The workaround is designed to track properties that are changed on an entity and only ship those to the server during a create or update.  Turns out, the work around doesn’t appear to send N:1 relationships to the server depending on how you set or modify the value of the property.

Imagine you have an entity Book and the Book Entity had a N:1 relationship to Contact and a attribute crmbook_contactid was created on the entity.  If you set the value of this like the following:

bookInstance.crmbook_contactid = new EntityReference {id=idValue,Contact.LogicalName};

You will find this won’t send the value to the server. If you are curious, the id and logicalname properties are marked as changed in the tracking of what is dirty, but not the crmbook_contactid property.  What I have found to work is the following:

First, Create the entity Reference

var myRef = new EntityReference {id=idValue,Contact.LogicalName};

Then set the value

bookInstance.crmbook_contactid = myRef;

Setting it this way I found properly triggered the change notification for crmbook_contactid causing it to be marked as dirty and sent as part of the create or update.


Tales from the Sandbox–Constructor Exceptions

Sometimes when you play in the sandbox you can get sand kicked in the face.  That was the case with building this plug-in thought I would share the story with you in case it saves you a few minutes. 

You probably know by now that if you build a plugin that runs in the sandbox it is running in partial trust.  In fact you might have even had it kill your plug-in when you executed it due to a security violation.  Many times its really obvious what is going on, and then other times like this one it might be elusive what the problem is.

This story started with building a new plug-in and trying to run it.  All it would produce was a simple “Security Exception” message on invocation.  No trace, nothing.  This started in on-line so I took it on-premise, tried it there same thing.  Checked tracing log, nothing useful.

I then tried to see if I could reproduce the exception outside of CRM.  The quickest way I found to get a partial trust environment was a simple console application – go to security settings and turn on Click Once, and set it for partial trust.  By default this is pretty locked down so you might find it too restricting but for some scenarios I think it might be helpful.  In fact it did identify one small thing that was wrong, but in the end I still got the same Security Exception message.

After gutting the plugin to nothing much left and still getting the error it was obvious I was missing something obvious.  What I failed to reproduce and/or check was the constructor getting called that took the config/secure config and in this case that was causing an exception, that exception ultimately hit some non sandbox friendly code in the constructor and killed the execution.  The net result was the simple Security Exception message with no other details.  So if you get that simple message – check your constructor.


Don’t trip on your own feet when using OData

CRM 2011 exposes a REST endpoint using the OData prototcol for working with data from Web Resources.  When using the endpoint from Silverlight the most common way is to use the generated proxy classes that are produced when you add a reference to the endpoint or by running DataSvcUtil.  When working with these generated classes and the default behavior of the WCF Data Services client all fields are sent to the server when an update is done on an object instead of just the changed fields.  This has some undesired effects like auditing being updated more often then it should not to mention if you have workflows triggering on any of the fields they will detect the change as well even though your app may have only modified a single unrelated field.  A particularly nasty surprise can be found also when you later decide to turn on field level  security and the user doing the update doesn’t have access to the field all of a sudden you will get errors due to the update.

Not all is doom and gloom, you can fix this by a few tweaks to the generated data context to ensure that when changes are posted to the CRM server that only the modified fields are sent.  You can find details and the code to add on the CRM team blog here.


Collapse a Tab, It might stay that way

One of the things you might do when editing a form in CRM 2011 is collapse a tab to make room to edit another area. What you might not realize is the side effect of that change.  In case you haven’t seen how tabs are presented now in CRM 2011 here is an example of the General section on an entity.


By default this is expanded like you see in the image.  By simply clicking on the carrot next to the label (see the arrow) you can collapse the tab content.  Sometimes I’ve done this in the form editor and usually return it back to expanded before I save.  Initially, I thought this was just changing it for my form edit section but in reality it is actually changing the Tab Expand this by default property as you can see in the following image.


So this change that I originally thought was just a design time change turned out to become a runtime change after publish.  So the key message here is if you are collapsing stuff you might be surprised when your users wonder why they keep having to expand it!

If you haven’t tried the new layouts in CRM 2011 the new tabs (which really aren’t true tabs anymore) are nice.  That old limit of 8 or 9 tabs in prior versions is gone.  You also have more control to hide / show the tabs at runtime using the new Xrm.Page client side API.  That can all now be done using supported client side API calls.


Book update CRM 2011

As I’ve been traveling around the world doing training events on CRM 2011, a lot of people have been asking about an update on the book and what our plans are for CRM 2011. In addition to being crazy busy with all the things leading up to the launch we have also been busy working on updating content for CRM 2011. We currently have two CRM 2011 books planned for release in the next few months and I wanted to share a little bit of information on the plans.


Using Silverlight with CRM 2011 – Target Release March 2011

One of the cool new things in CRM 2011 is its support for making Silverlight a first class way to extend the user experience. This book will focus on all the different ways you can extend CRM 2011 using Silverlight including on Forms, on the Dashboard and many other creative ideas. The book also includes enough basic Silverlight information so if you are new to Silverlight you can get started right away.


CRM 2011 as a Rapid Development Platform – Target Release May 2011

A lot has changed since 2008 when the book was first published for CRM 4.0. At the same time, CRM 2011 is even more compelling for building a wide variety of applications that aren’t just limited to CRM. In this update to the popular CRM 4.0 book we will be focusing on providing deep information that developers need to build applications with CRM 2011 and the xRM Application Framework.

In both cases stay tuned if you have purchased our prior books we want to make sure you also get some special offers for the new books as well. If you don’t have one of our books, make sure you register on the book site as a user –

For anyone that might be interested we are also in need of a small number of people to provide early reviews and feedback on the content. Ideally, this would be a mix of people who are new to the topics and some that have been heavily involved in CRM 2011 beta testing. If that is you and you are interested please contact me directly via my blog at


Solutions and Workflow Ownership

In Dynamics CRM 2011 workflows are one of the supported Solution components. Workflows are owned by a specific user that doesn’t have to be the one working with the solution. One of the questions I got recently was around how ownership was handled during import of a managed solution into a new organization.

For the purpose of this blog post, let’s assume User A, created Workflow 1 and activated it. In this case, User A would be the owner of the workflow.

Next, the System Admin user created a new solution and did an add existing component on the workflow to associate it with the solution. The solution is then exported and imported into a new organization. The question is who is the owner of the workflow after the import?

The answer is whoever ran the import will become the owner in the new organization by default. It is possible even though the workflow is a managed component to de-activate it in the new organization and assign it to another user but that must be done post import.

Keep in mind that for security purposes the workflow when activated and run as a result of any triggering event will run in the context of the owning user. In many cases for solution level workflows this isn’t a problem, but it is something to be aware of. If configured for On Demand, the workflow will run in the context of the user that starts it.


CRM 2011 Leverages SQL Enterprise when available

In doing some testing last week I ran into an interesting challenge that turns out to highlight a CRM 2011 feature.  The feature is that when CRM 2011 detects SQL Server Enterprise edition it will take advantage of some of the features like partitioning for audit.  This is a good thing but there are some things to consider before just jumping in blindly. 

I found this feature by accident when I went to re-deploy an organization that was on Test Deploy 1 to Test Deploy 2.  It turned out Test Deploy 1 had SQL Server 2008 R2 Enterprise and Test Deploy 2 had only the standard edition.  During the restore process when it failed to start the database it became clear there was an issue.  Notice here the key word is it failed to start the database, not that it failed to restore the database.  This is the first key point to understand – it can’t detect the feature mismatch between SQL Standard and SQL Enterprise until the database has already been restored.  So for example if you happen to be restoring over the top of an existing database keep in mind it will wipe it out and restore the new copy that you will never be able to use.  When this happens you will get an error like “Database xyz_MSCRM cannot be started because some of the database functionality is not available in the current edition of SQL Server” at that point the database restore is complete but it isn’t usable.

In my case since I was just testing stuff I was able to upgrade that instance to enterprise to get the org working.  To do that, you can go to Maintenance on the SQL Server Install and there is an option for Upgrade Edition.  You type in the key for the enterprise SKU and then after a minute or so it’s done.  As soon as that was completed the database was not showing as available in SQL.

Ideally, I’d like to see CRM during the setup of the deployment or the organization prompt if you want features enabled that would impact portability of the database across different SQL Editions.   Keep this in mind if you setup a new org in a SQL Server Enterprise deploy that currently this opt-in is done automatically.  I haven’t tried seeing if I start the org in a standard deployment, then import it into a SQL Enterprise to see if those features are enabled but that might be once possible way to try if you want to keep it at the standard SKU feature set.