Posted on 22. February 2011

How to clear options without leaving an empty entry

Using the clearOptions method on PickLists, can leave an empty entry because Drop Down lists in HTML must have at least one entry.

To work around use the following code that removes all options other than the current value to avoid the empty entry.

var attribute = Xrm.Page.getAttribute(“attributename”);
// NOTE: We can't use clearOptions since this adds an empty option 
// attribute.controls.forEach(function (control) { control.clearOptions(); })

for (var j = 0; j < attribute.getOptions().length; j++) {
	if (attribute.getValue() != attribute.getOptions()[j].value) {
		attribute.controls.forEach(function (control) {
			control.removeOption(attribute.getOptions()[j].value);
		});
	}

};

If this doesn't work for you, the empty entry can be manually removed using:


attribute.controls.forEach(function (control) { 
control.removeOption('') 
});

Posted on 17. February 2011

Microsoft deliver last milestone of Dynamics CRM 2011 release schedule

Following Januaries release of the Online Version, the last milestone in the Dynamics CRM 2011 project has been reached with the release of the On-Premises and Partner-Hosted Deployments.

The new version can be downloaded at the Microsoft Download Centre.

90 Day Trial Product Keys:

  • Microsoft Dynamics CRM Workgroup Server 2011: H84KC-JH8DF-7PDYK-TXBXR-2RMMT
  • Microsoft Dynamics CRM Server 2011: MQM2H-JYYRB-RRD6J-8WBBC-CVBD3

"Microsoft announced the new release scaled to 150,000 concurrent users in a single instance while delivering sub-second response times, once again raising the bar for performance and scalability in the CRM industry. The new benchmark results will be detailed in a Microsoft Dynamics CRM performance and scalability white paper that will be delivered in the coming weeks."

Read more about the release on the Microsoft News Centre

We are really excited about the huge investment Microsoft has made into improving Dynamics CRM from both the end user and developer perspective.

Posted on 11. February 2011

CRM2011 Support reference numbers

Support reference numbers are now provided to the user in CRM2011 when an exception is thrown where the details may contain sensitive information.

Initially we thought that they could be standard codes with corresponding meanings, however the code is a random code that is used to cross reference against the trace or application log. The message displayed is usually in the format:

"Reference number for administrators or support: #xxxxxx"

The section contains the Exceptions we have found using this method along with the resolution.

_____________________________________________________________________________________

System.Data.SqlClient.SqlException at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()

Cause: Occurred when executing a SDK Request during import/publish of Customisations.

Resolution: Wait until the import has finished and re-try. (V 5.0.9688.53)

_____________________________________________________________________________________

System.TypeInitializationException at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()

Cause: Occurred when a Plug In was executed after it had just been re-imported via a solution. The early bound proxy types were updated and I'm guessing the Proxy Types Behaviour was trying to load the old assembly.

Resolution: iisreset fixed the issue. (V 5.0.9688.53)

_____________________________________________________________________________________

System.Web.HttpUnhandledException Entity role must be specified for reflexive relationship <relationship name>

Cause: Occurred when trying to delete a N:N association where the relationship was defined as being between two entities of the same type.

Resolution: This is as yet unresolved (V 5.0.9688.53).

See http://social.microsoft.com/Forums/en/crm2011beta/thread/71ceaec4-a43b-494c-8518-a00e27f553cb for more information.

_____________________________________________________________________________________

System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {E5CB7A31-7512-11D2-89CE-0080C792E5D8} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion.

Cause: Occurred after a Plug In was re-registered using the Plug In Registration Tool.

Resolution: Re-booted fixed (V 5.0.9688.34)

_____________________________________________________________________________________

Microsoft.Xrm.Sdk.OrganizationServiceFault Plug-in assembly does not contain the required types or assembly content cannot be updated.

Cause: Plugin being registered does not have a public constructor with no parameters

Resolution: Add a public constructor without any parameters in addition to the constructor public MyPlugin(string unsecure, string secure)