Microsoft Dynamics CRM 4 - How to change a custom attribute's datatype

Yesterday I was trying to import a customization from one CRM 4 environment to another. There I faced an issue with same attribute being duplicated in both environments with two different data types. Due to a still unknown technical issue we can not delete any attributes from these environments. So the only option for me was to change the data type of the attribute in one environment to equal the both the data types. As the CRM 4 does not allow to change custom attribute types from the interface I had to do this from the back end (database).

Below is the query I use to do this;

UPDATE attribute
attributetypeid = GUID of the data type
WHERE name = attributename

You can find the data type guid's from attributetypes table.

PS : You will also have to change the datatype of the perticular column in the perticular table manually.

How to make your PDF files speak in Acrobat Reader

If you ever wondered how to make your PDF files speak, there is a very simple way of doing this. This has been there since the version 6.0 of Acrobat Reader.

First you have to press "Shift + Ctrl + V", this will enable Read Out Loud function in acrobat reader. Now you will see Read Out Loud menu item under View menu. In this you can select the reading options, alternativly you can start/stop reading using following key combination;

Shift + Ctrl + B- Read the whole document
Shift + Ctrl + V - Read the current page only
Shift + Ctrl + C- Pause
Shift + Ctrl + E- Stop

The voice will be your choosen voice in the text to speach section in the control panel. You can download alternative voices from here for free .

This is really cool and  a very helpful feature.


MS CRM 4 Form Printing - "This form has been changed and must be saved before printing"

I have come across an issue with Printing a CRM 4 form today. The messege "This form has been changed and must be saved before printing" appeared when I tried to print a form even though the form data is already saved.
After digging into the problem I found that this perticular form had two custom controls (textbox and a command button), because of this CRM was assuming this form has unsaved (isdirty true) data.
There is a workaround to solve this issue by changing the printing javascript in the main form script file.
First you have to log in to the CRM applicaiton server and go to the following location;
In this location you can find a file named "". Open this file and find the print function which should look like this;

function Print()
if (isDirty())
var sId = _oSubmitForm.crmFormSubmitId.value;
openStdWin(prependOrgName("/_forms/print/print.aspx?objectType=" + _oSubmitForm.crmFormSubmitObjectType.value + "&id=" + sId + "&title=" + CrmEncodeDecode.CrmUrlEncode(parent.document.title)), "print" + buildWinName(sId));

You can edit the above function to skip the isdirty check for the perticular entity which has custom controls. This will bypass the above mentioned messege and will go directly to printing. Change would be to the if condition for isdirty checking which should be the following;

if (isDirty() && _oSubmitForm.crmFormSubmitObjectType.value != 112)

112 is the objecttypecode for Case, you can change this to your disered entities objecttypecode. Hope this will help you, please drop a comment if you have any issues.

Blog Directory -