Tuesday, June 28, 2011

Plugin Set to Use Offline but Entity Offline Settings Not Configured

While attempting to deploy a solution to CRM 2011 I received the following error during the import.

image

0x80040203 - Supported deployment does not agree with message availability

After reviewing the code for the plugin I realized that it was attempting to register the plugin for both Server and Offline.

[System.ComponentModel.AmbientValue("CrmPluginStepDeployment=2")]

The problem there was that the Entity was not set for Offline mode.

offlinesettings

One the entity was updated the solution installed correctly.

Wednesday, June 8, 2011

CustomRule - Just one at a time please.

When you define a CommandDefinition in the CRM 2011 and you want to use a CustomRule underneath an EnableRule just remember that your CustomRule will never fire if you have other EnableRules applied to that Command Definition.  This means that you can't use a bunch of the already build in EnableRules on top of your CustomRule.... which sucks.  Instead you need to re-create the functionality in your CustomRule javascript.

For example you can't just use the Mscrm.SelectionCountExactlyOne rule to determine if there is only one record selected in a grid.  Instead you have to do the following; Pass in the CrmParameter called SelectedControlSelectedItemCount and then check to make sure that parameter equals one in your JS code.

I really don't like the ribbon schema.  It's confusing and the rules that apply to buttons you create don't always seem to apply to the ones that come out of the box, which makes it extremely hard to troubleshoot sometimes just using the output from the ribbonXmlExporter included in the SDK.

Here is an example of someone who has an example of what I described.
http://howto-mscrm.blogspot.com/2011/04/how-to-series-6-how-to-use-customrule.html





Thursday, June 2, 2011

Web.Config Modification Manager Update

So this is an update of a solution from Harmjan Greving which was an update from thekid.me.uk which can be used to view, modify, and create web.config modification that will be pushed to all servers within the farm.

The only changes I made from Harmjan's version was to fix some problems when loading modification which contained double quotes.  They were causing the page to load improperly.  Also for the current modification table I added a number field as the first column so that when I'm talking to customers over the phone they can tell me the number of mods or easily reference individual items.

To use it just download the webconfig.aspx page. Then drop it in the 12 hive at, C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\ADMIN.

The page can be accessed through, http://CA:PORT/_admin/webconfig.aspx