Getting inside MS CRM

If you think that solutions which are on this blog are unsupported, then take a look at the post which my new German colleague Arne Janning has posted:

Getting inside Microsoft CRM - Part I

He'll get you virtually inside crm and from there you will be able to do anything that you have ever wanted to do with MS CRM.

I'll have to warn you: if you don't feel comfortable with what you see, then just don't try this. You'll likely be messing up your (clients?) system :-)



MBS turns profitable

The Microsoft Business Solutions (Dynamics) group has made profit for the first time. The group posted an operating profit of $10 million vs. a loss of $17 million for the same quarter in the prior year.

Read the full Techweb article here.



MS CRM 3.0 trial download

You can now download MS CRM 3.0 for a 90 day trial in each language in which Microsoft CRM is available! The page will be updated with new languages as they are released.

http://www.microsoft.com/downloads/details.aspx?FamilyID=7d418781-69ad-422d-92fa-87fdb2538e2c&DisplayLang=en

Thanks to John for the information :)



Hide a form field

Now that each field offers an OnChange event, we want to use it. At least I do. Based on the selection or values in another field, I'm disabling fields all over the screen. But why disabling and not hide them?! It's not documented and therefore not supported, but it sometimes is needed. The code to hide a field is:


crmForm.all.name_c.style.visibility = 'hidden';
crmForm.all.name_d.style.visibility = 'hidden';

Ofcourse modify the name_c and name_d to the correct fieldname_c and fieldname_d.

Happy hiding!

Update: Thanks to Robert Amos for an even better way to hide the fields.



Add dates programmatically to CRM

Does that word actually exist in English? Programmatically?

Anyway. When you're working on a program which uses the SDK to add or modify data in CRM, then you will find out that there is not much documentation about how to use this data. And when you enter wrong data to CRM, then the error message doesn't help you much either: 0x80040216 An unexpected error occurred.

Well. Here are 2 code examples which should get you started. Make sure that you do not pass in time data if it is a date only field.
Example 1 (Add data including time):


contact contact = new contact();
contact.new_dateandtime = new CrmDateTime();
contact.new_dateandtime.Value = "5/27/2005T12:00:00";
crmService.Create(contact);


Example 2 (Add data excluding time):

contact contact = new contact();
contact.new_dateandtime = new CrmDateTime();
contact.new_dateandtime.Value = "5/27/2005";
crmService.Create(contact);



Quick create export functionality

Serveral of my customers are asking for an export functionality to Excel or CSV. Have you ever experienced that? If so, how did you create that?

Let me tell you my solution. MS CRM 3.0 does offer SQL Reporting Services for Reporting. The reports which are generated can be exported to Excel and CSV. With a little bit of tuning, you can even render a report into one of these formats, without requiring the user to press the export button. In this post I'll show you how this can be done.

Let's say you're using the Adventure Works Cycle demo. Then create a report in SRS (there's enough info on the web on how to do this) and upload this report to CRM. You can upload such a report to crm by going to the Workplace area, select Reports and click "New". Now you can access this report via CRM, but also directly. To open this report directly, go to this url (where you enter your own servername, report folder directory and report name):
http://[your server]/ReportServer/?/[your report folder]/[your report]&rs:Command=Render

Now with sending parameters, you can export this to CSV or Excel. Modify the attributes of the report to contain:
&rs:Command=Render&rs:Format=CSV
&rs:Command=Render&rs:Format=Excel

The problem with the CSV, is that default the separator is a comma. You might want to change this to semicolon (;) or tab. To change this to tab, use the format hereunder:
&rs:Command=Render&rs:Format=CSV&rc:FieldDelimiter=%09

Since we know now how to export data, we can also make this link available for users. Unfortunately the isv.config does not allow us to enter an url as describe above, but we can make a simple aspx, or even html, page which does redirect the user to that url. Just add the redirection page to the webserver and add a link in the isv.config. You have now made a very easy to modify export without coding!

Update:
Placing a code like that in the ISV.config.xml is not allowed due to the : in the query string. Instead you will need to direct your code to a intermediate page which will redirect you to the report. You can do this by using a simple html page with a meta refresh:

<html>
<head>
<meta http-equiv="refresh" content="0;URL=http://localhost/ReportServer/?/Adventure+Works+Cycle+Demo_MSCRM/Export&rs:Command=Render&rs:Format=CSV&rc:FieldDelimiter=%09" />
</head>
</html>



You definately need this for a demo!

Hi all,

Last weeks I've been giving some demo's. When a prospect would like to see a demo, then ofcouse I create a demo (in a virtual machine) in which they can recognize themselves. Every client has their own requirements and therefore require an own VPC. I used to use a simple VPC which has Windows 2003, SQL server 2000 and CRM 3.0 and extend this default image for every demo.

But now I have another default image :o) It's an image which contains Windows 2003, SQL Server 2005, Visual Studio 2005, Sharepoint Portal Server 2003 and more.

Best of this demo vpc, is that it is available for free! You can download this from Microsoft's website:
http://www.microsoft.com/downloads/details.aspx?familyid=A8EDFC7B-01D8-4500-845B-01370D4EED21&displaylang=en.

Be sure to have enough diskspace though, unpacked this VPC is about 11 gigs huge!



New MVP's!

Today I heard that there are new MS Dynamics CRM MVP awardees. One of my direct colleagues has obtained this award! Please join me in congratulating Rob Bakkers with this outstanding accomplishment!

Find out more about the MS Dyn. MVP's here: https://mvp.support.microsoft.com/communities/mvplist.aspx?Product=Microsoft+Dynamics+CRM