Microsoft Dynamics CRM 2011 | Migrate CallTimer Sample

CallTimerSampleSo you´ve upgraded your CRM System from 3.0 to 4.0 and now to 2011. And a great solution for productivity – originally started in Microsoft Dynamics CRM 3.0 SDK – the CallTimer Sample lives in your system so far.

Your users loves this tiny tool. It´s easy to handle, easy to implement and gives you a great enhancement using your phonecall-or service-activities.

And I think it is like the “Hello World” sample code you´ll find in most common developer books – every now and then I find it on my customer sites.

If you´ve migrated your 4.0 organization to 2011 it´s still found under the isv folder on your crmweb server.And your users will find an ISV group in the RibbonToolbar where they can open the timer window.

It´s still counting, but a click on OK will end in an error message, cause the updating routine in 2011 could not update this custom code. A closer look at the error message shows you why the code won´t work. It deals with crmForm. CRM 2011 now longer works with this. Instead we´re using Xrm.Page now.So how can you handle this and make this great productivity tool work again?

When you take a look at the original solution you´ll find the following lines in the timer.htm:

// Set the duration

oParent.document.crmForm.actualdurationminutes.DataValue = iTotalMinutes;

All you have to do is replace this with

have to do is replace this with

// Set the durartion

oParent.window.Xrm.Page.data.entitiy.attributes.get(“actualdurationminutes”).
setValue(iTotalMinutes);

– that´s all. Isn´t that easy?

Of course you can take a look at the new design and style guide an update it with the look & feel of CRM 2011 but your users loves u to get this done.

 

Technorati Tags:

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s