20 April 2008

Microsoft Dynamics Sure Step Methodology

I'm one of the first students in UK of the Microsoft Dynamics Sure Step Methodology, the instructor was Mr. Shaun Letley who is a brilliant guy works for Microsoft UK. So in the last year I had his Sure Step training course in Reading, United Kingdom. The course was very helpful; it does help me to have a better understanding of the project methodology.

The Microsoft Dynamics Sure Step Methodology is a comprehensive implementation methodology describing the processes and disciplines necessary to implement Microsoft Dynamics AX, Microsoft Dynamics CRM, Microsoft Dynamics GP, Microsoft Dynamics NAV and Microsoft Dynamics SL. The implementation of all these products has many similarities which is why the methodology has been structured as a general methodology with a product specific layer for each product. The general content is mostly the prescriptive phase by phase, activity by activity descriptions on how to carry out the implementation plus the Project Management discipline. The product specific content is typically represented as tools, templates and hyperlinks to product specific materials found outside the methodology.

The methodology is actually good for everyone in the project, not only for project manager/functional manager. As I'm a technical consultant, my major job is consultant/development a solution. I can still learn some helpful tips to make sure the project is going well. Also, the Sure Step provides a full process for both big and small projects so don't make misunderstanding about it. The Sure Step is actually suitable for all dynamics projects. It also provides a lot of templates which could be use in your project! Of cause you can still using your own templates with Sure Steps, it's flexible and powerful.

I strongly recommend the Sure Step methodology to all Dynamics people because it does make sure your project is well organised, delivery on time and easily maintained.

Take this link on PartnerSource to see the full details about Microsoft Dynamics Sure Step Methodology.

19 April 2008

"You have exceeded the maximum number of 2000 characters in this field; it will be truncated."

When you create a campaign in CRM 4.0, the Office field(attribute name: objective) has a 2,000 characters limit. How to get rid of the limitation?

It's a system field which you can't change its MaxLength from CRM customisation interface, however, you could make change from the customisation.xml file.

What you need to do is: export the campaign entity as a xml file, open the field, search "objective", you may find it's property: 2000, change it as you like(In CRM 4.0 the ntext data type has the MaxLength limitation up to 100,000 which is much better than CRM 3.0). Then save the file, import into CRM, and publish it. It works as you wish.

Although it's an unsupported customisation, since CRM 4.0 does allow you extend the field length(using DMM), so I think it's safe and nearly supported. :)

By the way, this technique can be used in many places, not just for this attribute. It also works in CRM 3.0.

08 April 2008

How to format a number field(integer) without showing commas?

There is an interesting topic on the CRM Forum about how to format an integer field without commas. For example, if you type: 123456 in an integer field, you may see 123,456 once it loses focus. CRM automatically add a ',' between 3 numbers. There's a global setting to get rid of it, however, it will get rid of all integer field format. How about if you just want to remove the format for just one field?

As you may know, MSCRM uses htc files to format the different type of input fields as same as email address etc, see my another post.

If you want to get the value of an attribute, in CRM we use: DataValue, e.g: crmForm.all.new_number.DataValue;
Notice that the DataValue is the real data saved in the database.

However, if you want to get the formatted value, you may use this:

So the trick is give the DataValue overwrites the value property.

Put the following code into the entity's onLoad() event, and the same code puts into the field's onChange() event.

if(crmForm.all.new_number != null && crmForm.all.new_number.DataValue != null)
crmForm.all.new_number.value = crmForm.all.new_number.DataValue;

Enjoy it!

05 April 2008

Add client-side Microsoft Office Word Spell Checker in CRM Email entity

There are many CRM spell checker add-ons on the Internet, most of those are free, but they are all server-side spell checkers.

Today let's introduce the new client-side Word Spell Checker which uses Microsoft Office Word spell check function. It does give users a familiar feeling and larger database. It also uses Word's spell check settings. So I think users will love it. It has been used for one of our clients live environment for half year, and it has great feedbacks.

As you can see, the client machine must have Microsoft Word installed for using this technique.(My clients are using Microsoft Office Word 2003, I'm not sure if it's compatible with Word 2007, please feel free to test this solution)

The file needs to be modified is: CRMWeb\Activities\email\edit.aspx

You may already recognized that it's an unsupported customization, so please make backups just in case your customization could damage the system and also could be overwrite by Hotfixs/Rollups.

Just simply add a function:

/*  Microsoft Office Word Spelling Check*/
function SpellCheck(field)
 textRange = window.frames[field].document.body.createTextRange();
   var oWord = new ActiveXObject("Word.Application");
   oWord.Visible = false;
   oWord.Top = -2000;
   alert("Error loading Microsoft Word Spelling Check: " + err);
 alert("Spelling Check Finished!");

You also need to modify the isv.config.xml fie to call this function:

<Entity name="email">
<ToolBar ValidForCreate="1" ValidForUpdate="1">
<Button Title="Spell Check" ToolTip="Spell Check" Icon="/_imgs/ico_18_home.gif" JavaScript="SpellCheck('descriptionIFrame');" />

What the function does is copy the text user typed in the Email body(descriptionIFrame), and paste it to a Word document, the document is unseenable because it has been moved out of the screen(oWord.Top = -2000) , then the function call Word.CheckSpelling() method to check the text just pasted. After correct all words, it will paste the whole text back to the Email body, and close the Word process.