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);
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.