Silverlight and Dynamics CRM

Silverlight is a new product from Microsoft that can be viewed as the same sort of plug-in as for instance Flash, Java Applets or ActiveX. There are two feautres that make it stand out from the rest, namely:
– Vector based graphics built on the new Windows Presentation Foundation (a part of .NET 3.0). The definition of the GUI is definied in a langauge called XAML.
– From Silverlight version 1.1, you can write managed code. In other word you can finally start working with C# or VB.NET on the client side instead of the irritating language javascript.

These two features make the foundation for a more user friendly and more rich experience of using the web, something at least I have been longing for. Being able to use managed code/CLR-code, will make web development a lot easier and speed up the process of making more robust and reusable programs.

On the CRM Team Blog you can download an example of how silverlight can be used in conjunction with Dynamics CRM 3. I saw that some people had had some problems with it, and I havn’t had time to test it myself yet, so be advised.

Here is the link: http://blogs.msdn.com/crm/archive/2007/06/19/crm-and-silverlight-integration.aspx

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Request hotfixes online

The most common way of requesting a specific hotfix for Microsoft Dynamics CRM or SharePoint is to call Microsoft Support (they cannot be downloaded directly). However, there is also a webpage where you can request a hotfix online. Have a look an add it to you favorites, you will probably need it.

https://support.microsoft.com/contactus2/emailcontact.aspx?scid=sw;en;1410&WS=hotfix

Gustaf Westerlund
Microsof CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Fake lookups

As I mentioned before, when I was working with the company Cybernetics, there is a way of creating false lookups when it might not be possible to do so normally (for instance system-system relationsships).

The blog http://andrewn23.blogspot.com/ describes in detail how this is done, so, if you are interested, please have a look. This technique can of course be enhanced in many ways.

Also, I am not certain if this technique is supported since Microsoft might decide to change the way some of these more internal pages (lookupsingle.aspx) work, hence breaking the customization.

The blog also mentions some hazards of using allcolumns that are very worthwhile reading (I like to use them to increase development time and change to specific attributes when I get performance issues).

So, take some time and have a look at it, I am however sad to see that the last entry was in october 2006.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Problems with read-only fields…

When creating javascripts in general and when working with AJAX-based javascripts (javascripts that access server based information) specifically, it is not uncommon to update attributes in CRM-forms. If these attributes are “Disabled” using the form-editor or are disabled using javascript in with the following code:

crmForm.all.xxx_myfield.Disabled = true;

Then any updates to the data of this field, will NOT be saved when the form is saved. There is a way to bypass this and this is to set the attribute to “Read only” instead, with the following javascript code:

crmForm.all.xxx_myfield.readOnly = true;

This will disable any editing of the field by the user, but any data that is modified will still be saved.
I have some other stuff I will share with you soon aswell.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Inactivating custom entities in code

I am currently working with as a sub consultant for what I beleive is Swedens foremost MS CRM supplier, Cybernetics, and ran into some problems when trying to deactivate a custom entity using code. I was unable to find any documentation at all in the latest version of the SDK but after a little searching, I found that Jonas Deibe at Microsoft Sweden, had the solution. Please have a look if you want to know how to do it:
http://blogs.msdn.com/jonasd/archive/2007/04/04/setting-status-with-setstatedynamicentityrequest.aspx

I’ll just give you some code my self:

SetStateDynamicEntityRequest req = new SetStateDynamicEntityRequest();
req.Entity = new Moniker();
req.Entity.Id = yfid;
req.Entity.Name = EntityName.cyb_yearlybusiness.ToString();
req.State = “inactive”; // = Deactivation
req.Status = -1;
service.Execute(req);

I have seen some very interesting “fake lookups” here at Cybernetics aswell, and I will soon be writing about how to create them.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se