Monday, November 14, 2011

The Flying W by Glenn Wilson

My Wife Anne Marie and I had a great vacation in Philly this weekend with my Mom.  We stopped by Weidener University on Saturday and took some panoramic photos of a sculpture that my Grandfather, Glenn Wilson, designed for the school called The Flying W.



Thursday, September 1, 2011

Xrm.Page.ui Not Available on Primary Grid

 

While developing an EnableRule for some new functionality I decided to use an Async call.  Here is a great link on how to use Async calls with EnableRule.

http://myencounterwithcrm.wordpress.com/2011/06/09/walkthrough-of-asynchronous-call-from-customrule-ribbondiff/

Microsoft even notes this strategy in the SDK documentation: 
test

Consider that Microsoft sees this as the “proper way” to do things you might think that they would provide the necessary methods to complete this, that would only be half correct.

All of this works if you are on an entity form because Xrm.Page.ui.refreshRibbon() is available.  Unfortunately if you are in a grid such as the one displayed below, Xrm.Page.ui is null, which means you cannot call the refreshRibbon() method.

test2

DAGGER!!!!!!

If anyone knows a way in which to get around this please leave a comment Smile

Wednesday, August 17, 2011

GetPickListProperty.name Returns Null in PreCreate

In CRM 4.0 using the Target.GetPickListProperty("fieldname").name property would return the string value of the pick list item display name even in a PreCreate plugin step.  Apparently though in 2011 the name property just returns null until after the initial create has been done.  Instead of using name make sure to use the Value property which is always available.

mypicklist Example:
Value  Name
1         Approve
2         Cancel

PreCreate step:
Target.GetPickListProperty("mypicklist").name  // this would return null
Target.GetPickListProperty("mypicklist").Value // this would return either 1 or 2

PostCreate step:

Target.GetPickListProperty("mypicklist").name  // this would return either "Approve" or "Cancel"
Target.GetPickListProperty("mypicklist").Value // this would return either 1 or 2


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

Tuesday, May 31, 2011

SharePoint 2010, Event ID 7043: Could not load type 'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker'

PROBLEM: Every time the application pool is reset the following error appears in the application log.

Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type
'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker' from assembly
'Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.


ORIGINAL SOLUTION:   It appeared at first that the problem was with a HTML encoded ',' in the assembly reference of the file which I changed by editing the TaxonomyPicker.ascx file.


You can see here that the ',' character has been encoded into
, 


Below you can see the correct way in which the reference should be done.


UPDATED SOLUTION:  The above updates stopped working and the next time an IISRESET happened the error came back.  After doing some research it appears that the TaxonomyPicker is never actually used.  To finally remove the error I just renamed the file to TaxonomyPicker_broken.ascx and the errors went away.