Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Dynamics CRM UK Blog

CRM news and views from Simon Hutson
Creating SharePoint Sites With CRM Workflow

Can I Play With Madness...

Now that I have a custom site definition that incorporates a minimal master page my next task was to automate the site creation process. I decided to build a custom workflow activity rather than a plug-in as this give me a high degree of flexibility in choosing how and when I create a site.

Following the SDK documentation for creating a custom workflow activity, the first job was to build the basic class, inherited from the workflow SequenceActivity base class.

image

Simply compiling this class and registering the workflow assembly with Microsoft CRM, enables this as a new activity in the CRM workflow editor.

image

Next, I needed to pass some parameters to the activity, including the URL of the parent site of the new site, the site template and the new site name. Again, following the SDK documentation for creating workflow dependency properties, this was pretty straightforward.

image

Compiling and registering the assembly exposes the input parameters to the CRM workflow editor.

image

In order to redirect the CRM form IFRAME to the new site, I needed to supply the new URL as a return parameter from the activity.

image

Again, compiling and registering the assembly exposes this output parameter to the CRM workflow editor, and in this case I am storing the site URL in a custom attribute of the CRM record.

image

Finally, I had to write the actual code to create the new SharePoint site. After a bit of reading, I found that the SharePoint web services provide enough functionality to achieve my objectives - specifically the Meetings.asmx and DWS.asmx web services.

image

Now, I'm not going to delve into the code itself, but I stripped out any error handling, logging etc to leave just the key functionality, so hopefully it is pretty self explanatory. The final piece of the solution is to create some client JScript to pass the new site URL to the CRM form IFRAME.

image

As you can see, the results look really good, and I can re-use this activity to create SharePoint sites for different entities without having to write any new code or register multiple plug-in events.

image

In order to make it easier for you to implement your own custom workflow activity, you can download the source code here. In addition, if you wish to use the functionality as-is, I've also included the compiled assembly file - all you have to do is register it with your own CRM application.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Quick & Dirty CRM Date Change

Goodbye To Yesterday...

Every so often I find I need to update various date fields in my CRM demo data for a last-minute customer demo. A typical example is when I'm demonstrating case management functionality and I want to update the CreatedOn or ModifiedOn date for all my cases, offset by some random number of days from a particular date. The easiest way to do this is by running a SQL script directly on the CRM database, but enyone who knows me well knows that I have this mental block when it comes to writing T-SQL code. So instead of spending hours trying to figure it out each time I want to make this kind of change, I thought I would post some typical T-SQL code here for me to re-use.

DECLARE @CreatedOn datetime, @IncidentId uniqueidentifier

DECLARE incident_cursor CURSOR FOR
SELECT incidentid
FROM incident

OPEN incident_cursor

FETCH NEXT FROM incident_cursor
INTO @IncidentId

WHILE @@FETCH_STATUS = 0
BEGIN

SELECT @CreatedOn = DATEADD(Day, ROUND(RAND()*365,0)-365, GETDATE())

UPDATE incident
SET createdon = @CreatedOn
WHERE incidentid = @IncidentId

FETCH NEXT FROM incident_cursor
INTO @IncidentId

END

CLOSE incident_cursor
DEALLOCATE incident_cursor

Please feel free to use this as you see fit, but remember folks that any kind of direct CRM database modification is totally unsupported and could lead to all kinds of mayhem, premature hair loss and other nasties, so don't try this on your production systems.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Minimal SharePoint Site Definition For Use With CRM

Go With The Flow... 

Following on from my previous post where I described how to define a minimal master page for Windows SharePoint Services (WSS), I thought it would be very useful to create a site definition with this master page already applied.

There's are several articles which show how to build your own site definition including the following:

The first thing to do was to create a new WEBTEMP.XML file for my site definition. Each front-end Web server in a deployment of WSS has a WEBTEMP.XML file located in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\1033\XML\ folder. This file contains all the default site definitions that ship with WSS (such as "Document Workspace", "Basic Meeting Workspace", "Team Site" etc) and should not be modified. Instead, I created a copy and renamed it WEBTEMPMINIMAL.XML, then stripped out all the original site definitions, and created my new "Minimal Document Workspace" definition as shown.

Note the <Template Name="Minimal"> attribute - this is used to later when creating the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\Minimal\ folder that contains my specific configurations.

WEBTEMPMINIMAL

Once WEBTEMPMINIMAL.XML was deployed to the WSS server, I performed an IISReset and the new site definition appeared in the list of site templates as "Minimal Document Workspace".

Minimal Document Workspace Template

Next I had to create a new ONET.XML file, which determines what the site definition actually looks like, what lists are created, what document templates are available, what the top and side navigation areas appear on the home page etc.

Copying the ONET.XML for the out of the box "Document Workspace" definition, I stripped out all the features I didn't need, leaving me with a site definition with just a single document library, and saved it to the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\Minimal\XML\ folder.

ONET

Finally, I wanted to to modify the behaviour of the default.aspx page that is provided with the out of the box "Document Workspace" definition. I decided that I wanted to provide two different default pages for any site created using my new site definition.

Firstly I created a default.aspx page that used the default master page in order to create a normal WSS site experience with all the standard navigation "chrome". As you can see, when I navigate to http://server/sites/demo/test/default.aspx I get the standard SharePoint look and feel.

Default Page

Then I created a minimal.aspx page that used my custom master page to create the minimal WSS site with no navigation "chrome". As you can see, when I navigate to http://server/sites/demo/test/minimal.aspx I get the view that I can easily embed in a CRM IFRAME.

Minimal Page

Although, it looks fairly straightforward, I went through a fairly lengthy trial & error process to get this to work just as I wanted. I have uploaded a copy of my site definition here, along with a batch file which copies the different files to the correct location on the WSS server and performs an IISReset. Once you have copied the files, you should see the new "Minimal Document Workspace" in your list of available templates when you go and create a new site.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

SharePoint 3.0 Document Libraries & CRM

Flood...

Firstly let me appologise for not posting regularly these last few months. Work has been expremely busy since Christmas, as has family life with my two boys running me ragged. However, to make up for this, I thought I'd share some of the bits and pieces I have been working on. One requirement that crops up all the time is to integrate Windows SharePoint Services (WSS) 3.0 document libraries within the CRM interface to provide a single place to access related CRM and SharePoint information. There are several article which show you how you can acheive this using an IFRAME within a CRM form, and even show you how to change the document library relative to the CRM record you are actually viewing

However, one "ugly" side effect of this is that you get all WSS navigation UI inside your IFRAME, which doesn't look particularly clean as you can see.

CRM Default SharePoint IFRAME

Now, spured on by Rich Dickinson's post SharePoint Document Libraries in Microsoft CRM which showed us how to remove the navigation and title-bar "chrome" from a WSS 2.0 Document Library I set about finding a way of achieving this with WSS 3.0. The good news is that the page architecture changed in WSS 3.0 to make use of ASP.NET Master Pages.

"ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page."

So all I should have to do is find the Master Page for my SharePoint Site and replace it with a modified one that strips out all the "chrome", leaving me with just the bits of the UI I actually want. Thankfully there is plenty of SharePoint information available which shows you how to achieve this, including this short 3 minute "how to" video - Building Simple Master Pages for Windows SharePoint Services 3.0.

In the video, you can see how easy it is to create a new Master Page in three simple steps by:

  1. Opening a Windows SharePoint Services 3.0 site in Office SharePoint Designer 2007.
  2. Locating and creating a copy of the site's Default.master page.
  3. Applying the new master page to content pages in the site.

However, what it doesn't show you was how to remove all the content you don't actually want. A typical WSS Site Template (such as the Document Workspace), uses approx 30 or so ContentPlaceHolder controls per page, which means it's not a simple matter of just deleting all the unnecessary HTML, you have to make sure that all the ContentPlaceHolder controls are preserved. There's an article I found which shows you how to create a minimal master page for Microsoft Office SharePoint Server (MOSS) 2007, which although doesn't work for WSS, gave me the headstart I needed to build my own.

Once created, I uploaded my new master pager to the site Master Page Gallery, then used Office SharePoint Designer 2007 to set it as the Default Master Page and the results you can see for yourself.

CRM With Custom SharePoint Master Page

As the ever-helpful chap I am (modest too.!), I have uploaded a copy of my new master page here, so you can get up and running quickly.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

CRM 4.0 License Key Upgrade Matrix

Without You...

In my earler post, I found we had changed the rules for upgrading CRM 4.0 Trial and MSDN license keys. In order to help you understand what upgrade choices you have if you are using one type of license key and need to upgrade to another key (without a full re-install of the product), I put together this handy chart. Along the left side are the license key types you are upgrading from (W = Workgroup Edition, P = Professional Edition and E = Enterprise Edition), and along the top are the keys you are upgrading to. A "Y" in the box means Yes, you can upgrade the license key in Deployment Manager.

As you can see, one one hand we have prevented you from upgrading from a 90-Day Trial key to an MSDN key, but on the other you can now upgrade from an MSDN key to most types of full license keys.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Microsoft Dynamics Communities

Can You Feel It...

Prompted by an e-mail from Robert Anderson, promoting his new website http://www.microsoftdynamicsaddons.com and an e-mail from Adam Berezin, promoting his new website http://www.msdynamicsworld.com/, I found a plethora of CRM, AX, NAV & GP community sites listed here on our very own Microsoft Dynamics site - Microsoft Dynamics Communities.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

CRM 4.0 MSDN License Key Usage Change

Jackie Wilson Said...

I upgraded one of my CRM 3.0 demo systems last week and used the CRM 4.0 Professional Edition 90-Day Trial license key. Shortly afterwards, I noticed that CRM 4.0 was available on MSDN Subscriber Downloads so I thought I'd upgrade to the MSDN license key. However, when I fired up Deployment Manager and tried to upgrade the license key I got the following message:

"The license code entered is not valid for upgrade. Make sure you have entered the license code correctly, and then try again."

I thought this might be down to a problem with my environment, but then I received an e-mail from Rob Clough telling me he had the same issue. I haven't heard anything from our product team in the US, but I have to assume that we have change the way we are allowing MSDN license keys to be used. I'll follow this up with the product team and let you know what I find out.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Reuben - So Long & Thanks For All The CRM

Waltzing Matilda...

It has been a long time in coming, but my antipodean colleague Reuben Krippner has decided that it is time to un-tie his kangaroo and leave the UK Dynamics team. However, the good news is that he will be "hopping" over the pond to join the Microsoft Dynamics CRM product team in Redmond as a CRM v.next product planner, which means that we have a great opportunity to bend his ear and nag him for those features we all want but never made it in CRM 4.0.

So don't forget people, if you bump into Reuben between now and the end of the month, make sure you give him you feature request list - I'm sure he'll appreciate the gesture :-)

However, that does leave a bit of a hole in the Partner Technology Specialist (PTS) team, with only Phil Rawlinson flying the CRM partner flag, I just checked the list of Microsoft UK current vacancies and saw that this job was posted along with a number of other Dynamics consulting and support jobs:

 This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Microsoft CRM 4.0 UK Customer Launch Events

Subdivisions...

We are holding two customer-only events to mark the launch of Microsoft Dynamics CRM 4.0, one in Reading on 31st Jan 2008 and the other in Edinburgh on 26th Feb 2008. The agenda will be as follows:

  • 09.30 - Registration
  • 10.00 - CRM Market Update
  • 10.40 - Break
  • 11.00 - What’s New in CRM v4.0
  • 12.00 - Showcase Customer Evidence
  • 12.30 - The Power of Choice – Hosting with CRM v4.0
  • 13.00 - Lunch & ISV Partner Solution Networking
  • 14.00 - Close

If you would like to come along, then you can register online:

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Where Is Your CRM 4.0 License Key?

We Are Finding Who We Are...

Not a week has gone past in the last couple of years where I haven't been asked by a customer or partner where they can obtain/find the correct license key for their CRM implementation, and quite frankly we didn't make this particularly easy for you. I saw a licensing presentation a couple of weeks ago, which aims to de-mystify the whole process and thought this would be a particulally useful resource I could point people to whenever they asked the question.

1. Trial License Keys

Applies To: Workgroup, Professional & Enterprise Editions

You can download the media from 90-Day Trial download web site here, where you can also find trial keys. To save you time, the trial keys are as follows:

  • Workgroup Edition (5 CAL limit): V8QCJ-74RXV-FF27W-TY3V2-92MJY
  • Professional Edition (no CAL limit): P6MYC-RPKCC-QWWCM-6MTJ3-RT3DY
  • Enterprise Edition (no CAL limit): QCKXD-BDH8R-G74H8-RDYHX-R4K4T

2. MSDN Subscriber Downloads License Keys

Applies To: Workgroup, Professional & Enterprise Editions

You can download media from MSDN Subscriber Downloads and also obtain license key from the site. There are different levels of MSDN subscription available for development, test & demonstration purposes, but in order to access MIcrosoft Dynamics CRM 4.0 you will need an active MSDN Premium subscription. If you have an MSDN Operating Systems subscription or MSDN Professional subscription you will not have access to CRM 4.0

3. Microsoft Partner Programme License Keys

Applies To: Professional & Enterprise Editions

You will receive the license keys in the physical media kits. Existing partners will receive their license key on a card inserted in their monthly update kit and new partners, in the welcome kit.

  • Certified Partners will receive a CRM 4.0 Professional Edition key.
  • Gold Certified Partners will receive a CRM 4.0 Enterprise Edition key.

4. Microsoft Action Pack Subscription (MAPS) License Keys

Applies To: Workgroup Edition

If you are Microsoft Registered Partner and subscribe to MAPS, your license key will be on a Yellow Sticker on the DVD and media is shipped in your quarterly subscription kit.

5. Volume License Keys (Open, Select and EA)

Applies To: Workgroup, Professional & Enterprise Editions

Your license key is pre-configured on the media, and you no longer have to enter the key as part of the installation process. If you do need the actual license key, for example if you are upgrading from a 90-day trial key, this is on the media which you can order as follows:

  • Open License - media available through eOpen
  • Select & EA - media available through MVLS (Microsoft Volume License Services)

6. BRL (Business Ready License) License Keys

Applies To: Professional, Enterprise & Academic Alliance Editions

Before May 2008, your License Key will be on a note attached to your Microsoft Dynamics Partner Invoice. After May 2008, your Microsoft Dynamics Partner will obtain the license key(s) in VOICE (Virtual Organisation Information CEntre),

7. SPLA (Service Provider License Agreement) License Keys

Applies To: Service Provider Edition

Your license key is pre-configured on the media, and you no longer have to enter the key as part of the installation process. You use the same key for each instance of CRM you deploy, so you need to use the same media each time.

8. ISV Royalty License Keys

Applies To: Professional & Enterprise Editions

Your license key is pre-configured on the media, and you no longer have to enter the key as part of the installation process. You use the same key for each client solution you deploy, so you need to use the same media each time.

Hopefully this will clear up most of the confusion that surrounds CRM product license keys, and enable you to get the right key at the right time, every time.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Download CRM 4.0 RTM Now

Comfortably Numb...

So much CRM goodness in one day - now everyone can download the full version of Microsoft CRM 4.0 with a 90-day evaluation license from the Microsoft Download Center:

Download details: Microsoft Dynamics CRM 4.0 Trial Versions

Download details: Microsoft Dynamics CRM for Outlook (For On-Premise and Hosted Editions)

Download details: Microsoft Dynamics CRM 4.0 Data Migration Manager

Download details: Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise and Hosted Editions)

Download details: Microsoft Dynamics CRM 4.0 Implementation Guide

Download details: Microsoft Dynamics CRM 4.0 Server Readme

Download details: Microsoft Dynamics CRM 4.0 for Outlook Readme (On-Premise and Hosted Editions)

Download details: Microsoft Dynamics CRM 4.0 Data Migration Manager Readme

Download details: Microsoft Dynamics CRM 4.0 E-mail Router Readme (On Premise)

Go on, enjoy the moment and download everything.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Microsoft Dynamics CRM 4.0 Internet Facing Deployment Scenarios

Pump It Up...

A new document has been posted on the "Microsoft Download Center" describing how to install CRM 4.0 for an Internet Facing Deployment (IFD). You can download the document here.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

CRM 4.0 Videos on Channel9

The Trooper...

Just in case you hadn't see the other CRM blogs, there are 4 video interviews on http://channel9.msdn.com/ recorded by members of the CRM engineering team, showing various CRM 4.0 features:

CRM 4.0 Overview with Phil Richardson
CRM 4.0 Deep Dive with Phil Richardson
CRM 4.0 Workflow with Praveen Upadhyay
CRM 4.0 Reporting with Barry Givens and Phil Richardson

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

CRM 4.0 Has Shipped

Aces High...

I just spotted the short, but perfectly formed announcement on Michael Lu's blog here that CRM 4.0 RTM (Release To Manufacturing) was signed off by the CRM product team on Friday 14th December 2007.

If you are a Microsoft Dynamics partner and have access to PartnerSource then you can download the following pricing and licensing information:

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

Who Builds Our VPC Imges?

Can you feel the love tonight...

I just saw Menno's post and he's feeling sore because few people (myself included) have given him credit for all the hard work he has put in to build the CRM 3.0 and CRM 4.0 CTP3 demo images that we all know and love. I just want to correct this injustice by saying publicly:

MENNO, YOU'RE OUR HERO..!!!

I hope that set the record straight.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy

More Posts Next page »
Page view tracker