This time I request some help from you

And now, for something completely different. Usually, at least I hope, you can find the answer to your questions on this blog, but this time I would like to ask you guys for a favor. I’m looking for a sponsor.

My little sister Iris Lemmen, 20, doesn’t share my passion for Dynamics CRM. Instead her passion is with Judo. She’s awfully good at it as she has become the Dutch champion for three times. Now she’s working hard to get the European title. In order to achieve this she trains six times a week and spends many days abroad for training camps. Usually my parents are the biggest sponsors for these costs.

Now she has the opportunity to go to the place where Judo has started long ago. She has been invited to visit the Kodokan. This is where Jigoro Kano in 1882 founded his own style Judo. These days this place is still known as the most impressive and educative location for Judo fanatics. She will spend almost two weeks in Japan for training and visit a Grand Slam tournament. After the tournament she will train with the Judokas of the tournament. This means she will be training with the world class of Judo.

As you can imagine, this is a great opportunity she definitely wants to utilize. Unfortunately Japan is one of the most expensive countries in the world; the Japanese readers can confirm that. This is why Iris does need sponsors for this training camp. Of course my parents, I and other relatives are sponsoring her, but we cannot cover all costs. The expectation is that this trip will cost €2.500,-, of which my parents will cover the flight costs. Together with the other sponsors we collected in total almost €1.000,- already. Who can help us to get my sister fly to Japan in the first week of December?

Feel free to post a comment if you are interested in sponsoring Iris. Please let me know who to contact. It would be awesome if you can help me this time, and it offers a way of getting your name connected to one of the Judo champions of the future!


Yep, that's me with Iris!

Next time I'll post about CRM again :)



Close Campaign Response window

Did you ever notice that you will get an warning message when you close a new Campaign Response window? The message you will get is:


Are you sure you want to navigate away from this page?
Your changes have not been saved. To stay on the page so that you can save your changes, click Cancel.
Press OK to continue, or Cancel to stay on the current page.
OK Cancel

You do get this message because Microsoft is automatically filling the Received On attribute. This does set the modified flag on this attribute and the close screen event will recognize this flag. To remove the flag, you will need to reset the value for Received On by using a very simple script like this:

//Receivedon is automatically filled. Setting this value to null prevents a warning when closing the screen.
crmForm.all.receivedon.DataValue = null;

When you bind this script to the OnLoad, you will need to keep in mind that the receivedon won't be automatically filled. You can also look into binding this script to the close window event which will be a bit harder. I'm sure that's possible, who will creat this script for the community?



Update owner in Plugin

Here's a code snippet that will help you to update the owner of a record in a plug-in. This code should run in a POST plug-in:


SecurityPrincipal assignee = new SecurityPrincipal();
assignee.Type = SecurityPrincipalType.User;

// PrincipalId is some known Guid belonging to the user or team that will own this record.
assignee.PrincipalId = new Guid("476E234C-5E15-DE11-80BA-000C297AF856");

// Create the target object for the request.
TargetOwnedAccount target = new TargetOwnedAccount();

// Set the properties of the target object.
// EntityId is some known Guid belonging to the account that is being assigned to the user.
target.EntityId = id;

// Create the request object.
AssignRequest assign = new AssignRequest();

// Set the properties of the request object.
assign.Assignee = assignee;
assign.Target = target;

// Execute the request.
ICrmService service = context.CreateCrmService(true);
try
{
AssignResponse assignResponse = (AssignResponse)service.Execute(assign);
}
catch (Exception ex)
{
//TODO: Exceptionhandling
}


Have fun copy and pasting :)



Links in e-mail templates

It is not so hard to get a link in a CRM template, but to hide the link behind your custom text is more difficult. It is possible to do so though. I noticed a small post in the communities by my fellow MVP Adi Katz in which he explains how you can do this. This post does deserve a bit more attention so that's why I am copying the content in this blog post. And now I can find it back as well :)

Adi Katz:
You need to create a new text attribute (e.g. new_workflowhref ) that holds an entire Anchor HTML tag with the HREF property set to the desired link.

Here is a simple example:


<a href=”http://[server]:[port]/[organization name]/userdefined/edit.aspx?etc=10016&id=40f03814-8544-dd11-b4d5-0003ff230264”>click here for more information</a>

You need to set this attribute on a post create event using a plug-in OR you might use Ajax to set this attribute when the form returns after creation e.g.

crmForm.FormType == 2 && crmForm.all.new_workflowhref.DataValue == null

Insert the new_workflowhref field inside the email body. The workflow should run when the new_workflowhref changes.

Cheers,
Adi



Document your CRM installation

Everybody knows the importance of documentation of a project. Thanks to Merijn van Mourik and some other guys there is a tool which can help you documenting your solution. This is a free tool which you can download from Codeplex: CRM 4 documentation.

If you want to use this tool on a standalone machine or a machine without internet connection, then you should download and install the following files first:

vstor30.exe
vstor30sp1-KB949258-x86.exe

I do know that this is not a new tool, but not everybody heard about this before. Happy documentation!



Action Microsoft.Crm.Config.Client.InstallPstAction failed

While installing the Outlook Client, there is one error that appears to be popping up more than others:


Action Microsoft.Crm.Config.Client.InstallPstAction failed.
LaunchOutlookInstallerProcess failed.

There are some blog posts which offer solutions to this error message. If you have this message, try the following:
- Run %windir%\system32\fixmapi.exe
- Reinstall the client
- Install latest rollup of the Dynamics CRM for Outlook client (same version as on server)

Or look at the following blogs:
- http://blogs.msdn.com/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx
- http://blogs.msdn.com/mscrmfreak/archive/2006/06/12/627955.aspx

Now these solutions didn't fix the error for one of our clients. Thanks to my colleague Wouter de Nooij we solved this by setting the Microsoft Office language to English. Then redo the configuration (using Start > Microsoft Office > Microsoft Office Tools > Microsoft Office 2007 Language Settings). After that the configuration succeeded. Resetting the language setting to Dutch did not result into problems, so all is well now.

Please let me know if you find other solutions for this error message!



Remove attributes from form which cannot be removed

There are some attributes on CRM default forms which you cannot remove. This post will show you how you can do this anyway. While doing so, please keep in mind that Microsoft must have good reasons to fix attributes on the form. Removing this might have implications, as always have a good backup ready.

The steps you need to follow to remove are:
- Export customizations for the specific entity
- Modify the form in the customizations xml
- Import the modified customizations

Since most of you are well known with CRM I will skip the Export and Import of customizations. If you need assistance with this, then don't try this change anyway :) To modify the customizations, open the file in notepad or another XML editor. In this file look for this path:

ImportExportXml - Entities - Entity - FormXml - forms - entity - form - tabs

Within tabs look for the tab with the correct name and similar for the sections. Get a bit familiar with the section xml once you have found the correct section. You'll find that there are a couple of lines that you need to remove. This is the example for the subjectid on the case entity:


<cell id="{a9859c32-0cdc-41b5-8e7e-3eb173cab4a8}">
<labels>
<label description="Onderwerp" languagecode="1043" />
<label description="Subject" languagecode="1033" />
</labels>
<control id="subjectid" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="subjectid" />
</cell>


Attributes which are locked on the form includes the following:
case - subjectid
case - contractid
case - contractdetailid

Note: Some of the attributes are used in hidden javascript codes. For instance the case contract contractid is used in the script for the customer onchange. You can also look at removing those scripts from the customizations file.