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

No more vacation – but soon Convergence!

Well, my 7 week vacation/parent leave is coming to an end, as is my low activity on this blog. I’ve been away from a proper internet connection which is why I havn’t been to active. It will be intersting to start working again now, that I have a 7 weeks old daughter at home.

Well, I really like to work with these products and all the interesting customers I have, so it’s not very saddening to go back to work, and I like to be active here as well.

In october I hope to be meeting some of you at Convergence 2007 in Copenhagen. It will be some very interesting days. If you havn’t registered already, please do, it will be very valuable. Have a look at Microsofts webpage: http://www.microsoft.com/dynamics/convergence/copenhagen/default.aspx

I will be staying at Copenhagen Strand, it would be nice to meet some of my blog readers, so if you havn’t already booked an hotel, you could always give it a try. Hope to see you there in person!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Interesting fix for anoying problem

As some of you who work with SharePoint might have noticed, when creating a web-part-page-document-library, the new pages loose the quick launch. Patrick Tisseghem has written a blog on why this is and how to fix it using SharePoint Designer.

http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?List=91f6455c%2D4448%2D4303%2D8a38%2Db1722e1522d1&ID=1744

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Excel Add-in for double directional sync of SharePointlists with Excel.

As many of you might know, the functionality of double directional syncronization between SharePoint lists and Excel sheets was removed in the 2007 version. Why? I don’t know, it probably didn’t make the magic features-that-will-be-included-line. However, an add-in for Excel 2007 can now be downloaded that enables this feature.

Check it out: http://www.microsoft.com/downloads/details.aspx?FamilyID=25836e52-1892-4e17-ac08-5df13cfc5295&DisplayLang=en

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se