Blog Archives

Walkthrough: Capturing the GUID Values of Records Selected in a Grid (CRM 2011 Edition)


You might remember this one from the SDK for CRM 4.0. Doing the same steps as described here won’t get you there for CRM 2011. It seems the dialogArguments no longer contain the selected Guids. It took me a while

Tagged with: , ,
Posted in CRM 2011

Setting the crmForm or a Field to Dirty


CRM 4.0 does not allow you to change the IsDirty property of a field or the crmForm. These properties are calculated. The way CRM calculates this value is by checking the fields DataValue against the fields defaultValue. It might be

Tagged with: ,
Posted in CRM 4

Pre-Loading IFRAMES in CRM 4.0


When you are using IFRAMES in CRM that are displayed in another tabpage than the default tab, the IFRAMES will load only when the user clicks on this tabpage. It might be required that the pages displayed in these IFRAMES

Tagged with: ,
Posted in CRM 4

Get the name of a lookup that is not resolved


I often have to check the name value of a lookup field. In normal cases one would use the code crmForm.all.new_lookupfield.DataValue[0].name to retrieve this value. In case of an ambiguous or failed lookup, this datavalue will be null. Ambiguous lookup

Tagged with: ,
Posted in CRM 4

Refreshing a parent window when crmForm.IsDirty


When you try to refresh the parent window from an ISV page and the crmForm was
modified but not saved, you will get a confirmation dialog from CRM asking you
to continue or cancel the action.

To disable this behaviour you can Save the CRM form before the refresh action.

This seems to be standard CRM behaviour. You can try this when modifying an
account and then deactivating it. The new values will be saved automatically and
the account will be deactivated.

Put the following code in the OnInit of the aspx page:

Tagged with: , ,
Posted in CRM 4

Hidden buttons reappear when resizing a crmForm


In a previous post  I described how to hide custom buttons in a toolbar. When a CRM form is resized by the user it appear that these hidden buttons will show up again. To avoid this behaviour you should put your

Tagged with: ,
Posted in CRM 4

Hiding custom buttons in CRM 4.0 Toolbar


In CRM 3 it was possible to hide a button on a toolbar just by calling the document.getElementById(“”).style.display = “none” method. This will NOT work in CRM 4.0. The ID of the button seems to be generated when the CRM

Tagged with: ,
Posted in CRM 4