Monday, December 18, 2006

IT-Proffs - CRM

This is a posting directed at all swedish speaking readers!

If you havn't already been there, check out the swedish forum called IT-Proffs, it has (as far as I know) the only Swedish CRM forum. You will find me and several other talented and skilled CRM-professionals there like Jonas Deibe (Microsoft Sweden).

Apart from the global CRM-forum/newsgroup hosted by Microsoft, this is a bit smaller which makes it easier to handle, and doesn't flood you inbox.

Please note that you can set an automatic notification when a new messsage is added to the CRM-Forum. I hope to see you there soon! www.itproffs.se

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, December 15, 2006

SharePoint inside Outlook using Sitemap configuration in CRM.

During the latest project i was involved in, we wanted to show SharePoint v3 pages in Outlook using sitemap customizations in CRM. This worked great at first (we didn’t really test it), but after a while, when we started using it a bit more we sometimes got the following error message “MSO.DLL is not compatible with Outlook”, ending with an OK-button. Pressing it, made Outlook exit in error. Not very nice.

I don’t know exactly why this happened but I think it happens due to the loading of some active-X components that are not supported by the web browser in Outlook, which for some reason doesn’t seem to be IE. If anyone knows anything more about this, please let me know.

Oh, I forgot, we were using Outlook 2003 since V3C isn’t publicly released yet. Perhaps you won’t get this error if using Outlook 2007 since it is probably more compatible with SharePoint v3.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, December 13, 2006

Unable to access System Settings - weird error

I’ve had a lot to do lately why, there hasn’t been to much action here. I was involved in a Proof-of-concept for Microsoft CRM, SharePoint 2007, EPM 2007 and a few other products aswell. Very interesting work, but it left me a bit behind on the blog-front.

Well, as most of you probably already have heard, there is a Update Rollup containing lots of the hot-fixes previously released and also a few more features – like being able to set which attributes should be searchable in advanced find. You can download it here.

When working on the POC mentioned above I stumbled on a strange error. CRM worked fine (not the reports though, I found out at a later stage), but when I tried to access System Settings I got a really weird error message containing html-code. What had happened was this.

The VPC I was using had WSS v2 installed on port 80. I installed CRM on port 5555 (reporting services had been installed into port 80 /Reports and /ReportServer). After this I installed Enterprise Project Management (EPM) (i.e. WSS v3 with EPM addon), set it to work on port 80, thinking it would overwrite the existing WSS v2 and let Report Services work as it should. Utopia, this is not what happened.

What really happened was that EPM/WSS had switched off WSS v2 on port 80 and created a new website for port 80 (no host header). In other words, also switching off Reporting Services. When I tried to access System Settings in CRM, it tries to access Reporting Services for some of the settings and since WSS v3 was installed, it handled the call and returned an html-page displaying that the resource wasn’t available. This was handled by CRM as an exception and the content of the html-page was displayed in the error (as html-code).

So, what should I have done?
Uninstall WSS v2, install EPM/WSS v3, reinstall SQL RS, install CRM. Then I probably wouldn’t have experienced the problem I had above.
Use hostheaders to separate the different websites as suggested from Microsoft Swedens CRM guru Jonas Deibe.
I hope you don’t have to experience the same problem, since the only solution I feel works, is to reinstall.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, December 01, 2006

Microsoft CRM and Excel 2007

I've recently been assembling a demo for the Microsoft CRM / IW team in Sweden for the launch of Vista and Office 2007. The new V3C client is great but the one I could use was a beta and was a bit buggy.

One of the features of Microsoft CRM that many managers (and others) like is the Excel-button on lists. However, with Excel 2007, it doesn't work out of the box. For the demo, I got it to work by doing the following actions. Please note that these actions should only be used in a demo environment since they severely alter some of the security settings of Excel. When I find a better way to handle this (or if I find some one else that does), I will let you know.

1. Make sure you are running Excel as a user that has access to the CRM database. This is due to the fact that Excel will try to access the database directly and it wont work properly if you don't have access. The best way is to use a client computer that is part of the domain and a user that is a CRM user. That usually solves it.
2. Add "c:\users" to the trusted places in the trust center.
3. Set "Trust all incomming connections (not recommended)" in the trust center.

Now it should work. Sometimes it takes Excel a while to get the data from the server, so be a bit patient. When I wrote this, I didn't have access to a test environment with CRM and Excel 2007 so I might have some details wrong (like the exact naming of fields in trust center).

I hope it works for you, Microsoft CRM 3 with the new Excel 2007 with conditional formating will blow the socks off any Manager I know... :)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, November 17, 2006

Workflows and the user they run as

I would just like to make you aware of the following fact:
- Workflows run manually, are run as the current user.
- Workflows triggered by "Create", are run as the user who created the workflow.

This is true for the normal workflow methods and mostly concerns "Modified by". Ex. Modified by will be wrong if a Workflow updates an entitity after it has been created. (unless the same person created the workflow and the entity).

I havn't checked if this is true when using impersonation in custom workflow assemblies aswell, but I would imagine it is. The way to handle it is to set the service.CalledIdValue to the user you want to be the modifier.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, November 10, 2006

Offline client difficulties concerning customizations - be aware...

Hi,

I just wanted to discuss the problems concerning customizations and extensions concerning the outlook client in general and the offline client specifically.

When customizing CRM there are many different customization points, among the most important, callouts, or Business Logic Extension. These will work well on the desktop version of the Outlook client since it comunicates directly with the CRM server, in more or less the same way that the web client does. Please note my previous postings concerning how to handle the problem of the "Settings" menu, disapearing from the web-menu. In short, install the Outlook client to one URL and use the webclient on another, and your problem will be solved. It is due to caching problems in IE.

However, when using the laptop client in offline mode, all logic is handled in the client and the callouts are not run, as far as I know, not even when syncronization is done.

Concerning custom aspx-pages on a separate website, it might be possible to create a new site locally on the offline computer and let Casini handle that aswell, and the have special tags in sitemap and isv.config to handle the offline functionality. The webservice won't be available, so I don't know how much functionality you can really create. Perhaps, you can temporarily store some information and connect to the webservice when syncronization is done when the CRM-client goes online. How to connect to this and trigger it, I don't know.

In conclusion, I would like to suggest that you thouroghly revise each customization from the offline perspective and decide how to implement, block or leave out some funtionality on the offline client. To avoid problems with the customer, I would also suggest dealing with this at an early stage in the project.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

CRM Exchange Router - facts and fiction

What does the CRM Exchange Router really do? There are many missconceptions on the subject and a recent posting on the CRM-Team Blog tries to rectify this. Very interesting reading, esspecially for installation of the Router in very controlled environments.

(Click the heading!)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, November 09, 2006

Tectura Nav - CRM connector is now Celenia

The Tectura CRM-Nav connector that I have blogged about earlier has been developed by the company Celenia in Denmark. Due to all the problems with the company Tectura, it has now been decided that Celenia will market, sell and support their product by them selves and not via Tectura. This is good news since Tectura has been very problematic to work with.

Click the heading to go to Celenia.


Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, November 02, 2006

Using webservices from callouts developed in VS 2005

Arash Ghanaie previously published an excellent article on how to develop callouts using VS2005. A problem when doing this was however, that if you were using the common way of accessing the crm webservice, by adding a web reference, the program wouldn't compile since the web reference used .NET 2.0. The solution is to create a file containing all the references to the web service using the program wsdl.exe, and using the .NET 1.1 version of it.

Please check the link for further info on how it is done! (click the heading!)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, October 31, 2006

Identity 2.0

Well, when discussing impersonation we are not very far away from global internet authentication. I found this great presentation on how identification probably will work on the Internet in the future. It deals with webservices and CRM:s (Salesforce.com acctually). Above being a very interesting presentation concerning facts, the presentation technique is quite unique - check it out!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, October 27, 2006

Impersonation - a few tips...

I was working with an aspx-page that was called by an isv.config.xml-button today and had problems with getting the impersonation to work. It was quite obvious when I solved it. If you have similar problems, I have a few tips:

Usually the external webpages are run from another website that CRM. Make sure this website has anonymous access shut off and Integrated Windows Authentication turned on. Also make sure that the tag <identity impersonate="true"/> is in the web.config-file of the root of the website.

To avoid getting login-dialogs, make sure the site with the external pages are in trusted sites or Local Intranet Sites in IE.

If you have followed these tips, impersonation should work. The SDK mentions that users have to be in the PrivUserGroup but when I tried it still worked. Maybe that is needed in some special cases. If I manage to understand when, I will write about it.

Happy impersonating!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, October 25, 2006

PAR One by One

This is directed to CRM-consultants in Sweden.

If you don't already know of it, check out the product One By One from PAR Adressregistret AB. It enables you to get updated data directly from PAR into CRM including a service that will make sure you do not have any doubles. Click the heading of the post to go to their site!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Cool product - Enecto Prospect Finder

I attended a local CRM conference yesterday and I met a very interesting company with a very cool product! The company is Enecto and their product ProspectFinder helps you monitor who visits you websites and their behaivior on you site, like what pages they are looking at and how long.

It works by looking up IP-adresses in a huge database containing most companys of more than 8 emplyees in northern Europe. Then, by using information from DnB and filtering on the more interesting visitors, automated lead creaton can be made directly into you CRM-system.

At the moment there is no connector to MS CRM but according to the guy I talked to, Petter Andersson, it was in the progress of being made.

The lengths of where you can go with this product are far from exploited. The more obvious of creating leads from interesting visitors and adapting content to different companytypes, are discussed in more depth on their site. Look around, and you might get a phone call :)

Click the heading of this posting to go to their site!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Rumor: Microsoft will release Navision Integration i Q1/Q2 2007

I have spoken to several people in the CRM community and according to what I have heard, although not directly from Microsoft, is that they will release an integration engine for integration between MS CRM 3 and Dynamics Nav. However, it is uncertain if it will only concern the new version of Dynamics Nav, soon to be released or will work also for the current version of Nav. This is good news since the connector I have worked with from the Danish company Tectura has left many question unanswered and lots to wish for.

I still havn't had time to test the BizTalk connector and I havn't talked to anyone who has. If you have, I would very much like to know your feelings about it.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, October 20, 2006

Useful CRM related documents

Sonoma Partners have published several useful CRM documents on their website. Check them out! (Click the header!)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

AJAX Activity Indicators

AJAX is often used in customization of MS CRM and one of the uses is to give the client a more user friendly interface. One of the important aspects of this can be progressbars (or similar) to inform the user that something is happening. I found a page with lots of AJAX Activity Indicators. Click the heading to go there.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, October 18, 2006

MS releases the specification for VHD

Microsoft will release the specification for the file format VHD to the public. This is great since this will make way for loads of 3:rd party software for VHD:s! Click the heading...

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Microsoft CRM Sandbox downloads

If you havn't already checked it out, check out the dowload zone at Microsoft CRM Sandbox. Click the heading of this posting!


Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Installation problems with Office sp2 and windows update

A CRM-thread on the swedish forum IT-Proffs currently discusses some installation issues concerning Office 2003 SP2, where the administrator has problems installing the CRM client when SP2 is installed. Installation is not my main vertical but I found this related thread on Google Groups concerning installation problems and Office which might help some of you who have encountered problems with your CRM-Client after using microsoft update.

LINK

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, October 11, 2006

Cloning objects in CRM

Ever wanted to clone an object in CRM? There is no easy way to do this with "out-of-the-box" functionality. However, on the following link you can download some code that can do this for you! http://www.c360.com/Clone.aspx

I just found it and havn't had time to test it.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, October 10, 2006

Adding buttons to the toolbar

I just read a good posting on a blog concerning how to add buttons to the toolbar. The most obvious way is to use the isv.config.xml but this page also explains how to add buttons to the toolbar using javascript. This technique can be expanded to do even more interesting things with the GUI, if needed. Enjoy:

http://www.tconv.com/blogs/crm3tips/2006/03/modifying-standard-toolbars-in.html

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Monday, October 09, 2006

Changing of CNAME, not without problems for Outlook client

A customer of mine wanted to minimize the installation of clients and wanted to install the clients using a CNAME and then be able to point this to either the test/education environment or the production environment. We tried it out and it seemed to work (we used the lightweight client of course). However, after a while I found one feature in Outlook that stopped working, the function to invite attendees to a meeting.

If you created a normal appointment in outlook without attendees, and linked it to CRM. All was well, but if you tried to link an appointment with attendees, you got an error message, and the appointment wasn't saved to CRM.

There was a work-around, by first creating the appointment without attendees, saving it, repopening it and adding attendees. You would get the same error message, but since the appointment was created in CRM the first time you saved the appointment, and Outlook sent the invitation the second time. Most of the functionality worked with some extra clicking.

When the client was reinstalled using the same CNAME, this worked, just like it should.

This is a bit strange, I actually hadn't expected it to work at all, but that it worked in general and that just this function did not, was a bit strange.

Please note that even the desktop clients are registered in the CRM SQL Database, which is an indication against trying this techique. Perhaps it would work if it was the same server and the same database, but with a new IP.

Generally I would advise against trying this, and I have heard of people trying to modify the registry to achieve the same functionality (to be able to skip reinstalling clients) but none have succeded as far as I know. If you have, please let me know. I will of course give you credit!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, October 03, 2006

BizTalk adapter for MS CRM

Hi,
Microsoft have just released the BizTalk adapter for MS CRM 3.0, enabling connections to other software which have connectors to BizTalk.

I havn't tried it, but would like to, especially since the Tectura integration between CRM and Nav in many ways is incomplete. BizTalk is also a more general integration engine which enables connection to other ERP-systems like Oracle, SAP and more.

You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyId=4628FCA6-388D-45BC-A154-453B920DBCB8&displaylang=en

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Loading of Outlook client error

Some of you might have the problem of the Outlook client crashing when loading. I read an interesting posting on the official MS CRM Forum, and I have cut-n-pasted it here for your pleasure! It is a great tip, thanks a lot to Mike Sullivan at Quest Business Solutions!
____

Tired of getting CRM Outlook client errors. "An error occurred loading
Microsoft CRM functionality. Try restarting Microsoft Outlook or
contact your system admin if errors persist"

I've had the problem at two clients since Feb and finally solved it!
The symptoms are that every other time you open Outlook CRM client
installed, you get the above error and the toolbar is disabled. I've
read just about every posting out there and tried them all, but they
just weren't the right fix for me.

I would consider this a definite bug in the crmaddin.dll file. The
problem is simple: When the crmaddin.dll file is loading the Outlook
client GUI using the isv.config.xml file, if it runs into an "empty
menu" (a menu with not menuitems below to click on), it will fail to
create that menu on every other attempt, and stops processing the XML
file, so it doesn't load the toolbar..and you get the error box "An
error occurred loading Microsoft CRM functionality. Try restarting
Microsoft Outlook or contact your system admin if errors persist"

The problem is easy to identify (and fix) if you look in the
isv.config.xml file and have something like I did at the first client:

<MenuBar>
<!-- Custom Menus that appear between the Goto Menu and the Help
Menu -->
<CustomMenus>
<Menu Title="My Custom Menu">
</Menu>
</CustomMenus>
</MenuBar>

To fix it, just remove the empty menu.

However, it's not so obvious in the sample below.....

<MenuBar>
<!-- Custom Menus that appear between the Goto Menu and the Help
Menu -->
<CustomMenus>
<Menu Title="My Custom Menu">
<MenuItem Title="My Workplace"
Url="http://crm/c360/MyWorkPlace/redirect.htm" WinMode="0"
Client="OutlookLaptopClient" AvailableOffline="false" />
<MenuItem Title="My Workplace"
Url="/c360/MyWorkPlace/redirect.htm" WinMode="0"
Client="Web,OutlookWorkstationClient" AvailableOffline="false" />
<MenuItem Title="My Summary"
Url="/c360/Summary/redirect.htm" WinMode="0"
Client="Web,OutlookWorkstationClient" AvailableOffline="false" />
<MenuItem Title="My Summary"
Url="http://crm/c360/Summary/redirect.htm" WinMode="0"
Client="OutlookLaptopClient" AvailableOffline="false" />
<MenuSpacer />
<MenuItem Title="c360 Products"
Url="http://www.c360.com/products.aspx" WinMode="0"
Client="OutlookLaptopClient" AvailableOffline="false" />
</Menu>
</CustomMenus>
</MenuBar>

In the 2nd sample above, what's not apparent is that there are no
MenuItems that are Available Offline - all are false. So, if the
Outlook Laptop Client goes offline, the custom Menu is left empty, and
the error occurs while the user is offline, and will disappear when the
user goes online.

As a workaround, I made sure that at least one Menu item was available
offline by changing the following:
<MenuItem Title="c360 Products"
Url="http://www.c360.com/products.aspx" WinMode="0"
Client="OutlookLaptopClient" AvailableOffline="true" />

Viola! No more problem...and a bit more advertising for c360.

Disclaimer: I just used c360 as my example, as this problem is not
related to c360 products, rather to modifications made to the
isv.config.xml file and what I feel is a bug in the crmaddin.dll file.

Michael Sullivan
www.questnbs.com
Quest Business Solutions

--- END

Thanx again Mike. Great tip!

Gustaf

Monday, October 02, 2006

SQL Reporting Services Reports on SyncInfo

The CRM Team Blog has recently written a posting concerning two new reports that can be downloaded that will display the SyncData, i.e. information on when syncronization has been done, size of sync and a lot more. Interested? Have a look: http://blogs.msdn.com/crm/archive/2006/09/28/775951.aspx

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Simple CRM and SharePoint integration example

During the Swedish SharePoint and Exchange Forum 2006 held just outside Stockholm on Rosenön this spring, I showed how to make a simple integration of MS CRM and MS SharePoint 2003.

Both technologies are very versatile and are easily integrated with other software, mainly due to the helpful webservices that are available.

The integration I created was to automatically create a workspace when a new account was created. The following steps describe how this was made possible:

1. Create a site in SharePoint that will contain all subsites.
2. Create a new attribute in CRM, nvarchar 255 that will contain the SharePoint site URL.
3. Create an IFrame in CRM. Modify the onload JavaScript in CRM to set the src of the IFrame to the SharePoint site URL (if it is not null).
4. Create a dll that creates the SharePoint site and return the new sites URL and can be called on by a CRM workflow.
5. Modify the workflow.config to add the functionality to the workflow manager.
6. Create the workflow triggered by Create on account that creates the site and return the URL. Set the new SharePoint-site-url attribute to the return value of the function.

This integration is good, and it is also possible to create a more enhanced handling by using the PreCreate Callout instead of using the workflow. However, the workflow-addon created can be constructed to be quite generic and can hence be used for other purposes as well, (for instance creating a SharePoint site for each Opportunity).

I will base the SharePoint-site-name on the accountname attribute which is not guaranteed to be unique. In this example I will not go through how to make a duplet checking program, which should also be created, if the sites should be based on accountname. The sitename could also be based on the account GUID which is guaranteed to be unique.

I will now go through each of the six points in more detail:
1 . Create a SharePoint site that will contain all subsites
Just use the standard SharePoint interface, choose create from the top menu and then select site, almost at the bottom of the list, no specific template is needed. Note the url to the newly created site.
2. Create a new attribute for the SharePoint site url
In CRM, choose settings, customizations, customize entitys, account, attributes, create. Create a new attribute called for instance "new_spsiteurl" as nvarchar and length 255 (255 should be enough for anybody :).
3. Create an IFrame in CRM
Now choose forms and views in CRM. Choose form. You should now see the editable version of the account form. Click "New Tab" in the right hand menu. Name the new tab "SP Site" or something appropriate. The tab should now be visible.

Select the "SP Site" tab and then choose "Create section" from the right hand menu. Call it something nice. Also select to not show the name of the section.

In the new section, select "Add field". Choose the newly created attribute, "new_spsiteurl". Check the checkbox for read-only. Click OK.

Now choose "Create IFrame" from the right hand menu. Create an IFrame in the section created above. Check the checkbox in formatting that makes it fill the form. Call the IFrame something like "IFRAME_spframe". Click ok to create.

Click the "Form Properties" in the right hand menu at the bottom. Edit the onLoad script. Put in the following script:

If (crmForm.all.new_spsiteurl.DataValue != null)
{
crmForm.all.IFRAME_spframe.src = crmForm.all.new_spsiteurl.DataValue;
}

Close the dialogs. Click save and close on all forms. When you are back to the main CRM-window, select account in the entities list and click "publish".

4. Create the workflow addon dll
Open Visual Studio 2003 (it will work with VS 2005 as well, however, if you want to do this with callouts, you will have to follow the instruction concerning callout development in VS 2005 that I have blogged about earlier, with reference to Arash blog).

Create a new basic C# project with a simple class-file. Name the project something like "WFAddons". Rename the cs-file something like "WFAddons", make sure that the code is coherent with the naming of the file to avoid any confusions.

Make sure you have a reference to the SharePoint-dll.

With all the code to create the SharePointsite, the file should look something like this:

using System;
using Microsoft.SharePoint;

namespace WFAddons
{
public class WFAddons
{

public string CreateWorkSpace(string accountname)
{
SPSite siteCollection = new SPSite("http://localhost/sites/konton");
SPWebCollection subSites = siteCollection.AllWebs;

SPWeb mySite = subSites.Add(accountname);
mySite.Title = accountname;
mySite.Name = accountname;
mySite.Update();
return mySite.Url;
}
}
}

In the row: SPSite siteCollection = new SPSite("http://localhost/sites/konton");
Modify the url to match the site created in step 1.

Now set the output directory to the CRM-assembly folder. This is usually found here:
c:\Program Files\Microsoft CRM\Server\bin\assembly\ but is dependant on the CRM-installation.

Compile the project.
5. Modify workflow.config
In the folder: c:\Program Files\Microsoft CRM\Server\bin\assembly\, open the file workflow.config and before the end tags
(
</methods>
</workflow.config>
)

add the following:

<method name="Create workspace"
assembly="WFAddons.dll"
typename="WFAddons.WFAddons"
methodname="CreateWorkSpace"
group="SharePoint functions">
<parameter name="accountname" datatype="string"/>
<result datatype="string"/>
</method>

Make sure the settings corresponds with how you have compiled the workflow-addon-dll. The parameters are describes here:
Assembly - this is the name of the file found in the assembly directory.
Typename - this is the namespace followed by a dot and then the classname.
Methodname - this is the name of the method when working with it in Workflow Manager.
Group - Methods in Workflow Manager are Grouped. This is the group name.
Parameter name - this is the name that will be displayed in workflow manager for the first parameter. If you want to add more parameters just add them bellow. The name of the parameter does not have to be the same as in the code. However, the datatype must correspond.
Result - this is the data type of the return value.

Also, on the top line, in the top tag, add the following: allowunsignedassemblies="true" to allow unsigned assemblies to be executed by the workflow engine.

Before saving this file, shut down the process called: Microsoft CRM Workflow Service. Then save and start the process again.
6. Create the workflow
Now, all you have to do is create the workflow that will run all this and tie everything together. Open the workflow manager, select account, and create a new workflow that will be triggered on create. In the editor, select "Insert Action" and choose "Call assembly" select the group name (the same set in workflow.config above), and the select the method name. In the new dialog window, double-click the parameter (the name set in workflow.config) and choose dynamic value and select the entity Account and choose the attribute accountname. In the main action dialog, a you can now see this mapping. Enter an action name, like "create workspace". Click "Save".

You should now see the main workflow editor window. Press "Insert Action" on the left hand menu and choose "Update entity". A new dialog is show. Make sure the entity is marked as "Account", select the field "new_spsiteurl", choose "=" and not "+=", and then click the button to the far right on the same row. A new dialog is shown, choose dynamic value and in the dropdown called entity you should be able to select "create workspace", the name of the action that created the site. Close all the windows with "OK", "OK", "Save". You should now see the list of all account workflows. Select your new workflow and hit activate.

Now everything should be working as long as the uses running it all has sufficient rights. Try it out by creating an account, closing it, waiting 5 seconds (to let the workflow finish) and then open the account again. Go to the workspacetab where you should now see the SharePoint site that you created.

If you have problems, check the workflow monitor to see if the workflow ran properly or if it has stalled.

Please let me know of any problems or errors in this description. You are free to use my code, and description as long as you give me credit for it and link to my blog.

Please note that this example was made to show how it can be done. Please use it as a suggestion on this type of integration.

Gustaf Westerlund
HumanData AB
Markörgatan 4
136 44 HANINGE
Sweden
http://www.humandata.se

Tel:

Mobil: 0730-843 505

E-post: gustaf@humandata.se

Friday, September 29, 2006

SharePoint and Access

This post will concern SharePoint for once in a while!

As most of you know, it is possible to link SharePoint lists to excel, however, it is also possible to link SharePoint lists as tables in Access. This is very usefull since you can then create more advanced views using complex SQL. Data can also be linked with data from other sources, if needed. There should also be some ODBC driver that could be used to fetch data from a SharePoint list, however, I havn't seen one. If I do, I will let you know.

How to link a SharePoint list into Access as a table:
1. Make a new view in SharePoint with all columns and all rows. Call it something nice like "everything".
2. In access, choose the file menu and then choose "Get external data" (I am using the swedish version of access, so excuse my translation) and then choose "Link tables". In the dialog that opens, you can choose SharePoint list from the filetype dropdown. Then enter the url for the site, not the list. You will then be prompted for which list you want to use and so on and so forth. When done, you will have one maybe more linked tables in Access which will work just as any other tables in access.

Happy SQL:ing!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, September 28, 2006

Developing with VS 2005

Extending MS CRM 3.0 is normally done using Visual Studio 2003 and this is also the only supported development environment. However, it is possible to develop using VS 2005 as well. Some things have to be considered.

.NET 2.0 will work fine for external web applications using the CRM Webservice (not very strange since the webservice is generic)

.NET 2.0 will probably also work fine when developing workflow dll:s, but it is not supported. At least it worked when I tested Hello World! :)

.NET 2.0 will not work when developing callouts. However, there is a great description of how to develop these in VS 2005 anyway but for .NET 1.1. Beware that you cannot use specific .NET 2.0 functionality.

Here is the site: http://blogs.msdn.com/arash/archive/2006/08/25/719626.aspx

A good thing with this is that the standard TDT can be used when developing customizations. I am no licensing expert, so make sure it's within your licensing agreement.

Gustaf Westerlund CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, September 27, 2006

Odd SQL Reporting Services Error...

I was working with a custom report today and I had a very strange error which I have noticed that several others also seem to have, both with SQL Reporting Services and other .NET applications. The report I was making worked fine, but when I tried to deploy it to the site, I got the following error:

"Length cannot be less than zero."

When I dubbel-clicked it in VS2003 (yes, I am still using it), the sourcefile of my DataSource was shown, and there was nothing wrong there...

Well, I tried lots of different things, restarting, trying to deploy to another server but the error was still the same and I could see the report was working fine i Preview mode.

Well, after a while I got fed up with it, and just tried to install the rdl manually on the reportserver (using the update function, in the properties tab of the report). It worked!

Hence, there seems to be some error in the deployment of reports in SQL Reporting Services. If you get this error, try to bypass it, your report might not be the problem after all.

Anyone reading this that knows why the deployment didn't work? I'd like to know!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Web and Outlook mixup

As some of you might have noticed, if you have the Outlook desktop client installed and Outlook open, and then open CRM using IE, you will loose some web-specifics like the "Settings" menu and other addons specified in the sitemap or isv.config.xml as "web".

This is due to the fact that these files are downloaded to the client by IE when Outlook is started and these are then cached by IE. When the same URL is opened, IE recognizes these files, and does not download any new files, hence you get the Outlook-client specific.´

How to solve this? IE bases its caching on the url so you just have to install the crm-outlook-client to one url and use the webclient for the other. Note that you can even use the IP adress as one of the url:s, since IE doesn't resolve the name when checking for cache-hits.


Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, September 22, 2006

Downloading the IE fix

I read the CRM Team Blog and they have a link to the IE-fix concerning the bug discussed bellow.

http://www.microsoft.com/downloads/details.aspx?familyid=ff9bc431-01f3-48e8-9a58-d701d2e60c1d&displaylang=en

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Use AllColumns

When retrieving data from the CRM webservice, part of the
RetrieveRequest-object needs to have the required columns specified. In
many of the examples this field is specifically set to the columns
needed, which is the most "correct" way of retrieving the data. However,
if you aren't experiencing performance problems the easiest way is to
use the AllColumns-class.

In short:

RetrieveRequest retrieve = new RetrieveRequest();
retrieve.ColumnSet = new AllColumns();

This is probably old news to all of you who have coded a bit. But I
thought I might write a bit about it anyway, since not all people are
experts at birth.

Gustaf

Wednesday, September 20, 2006

more on SubscriptionSyncInfo

Well, sometimes it's better to look first and blog second,
I looked around a bit and found that the CRM Team Blog actually have an entry on how this works. Have a look here: https://blogs.msdn.com/crm/archive/2006/08/15/701230.aspx

The SubscriptionSyncInfo table seems to be the place where all syncs are logged to the database. Very usefull for checking if a users sync has been successfull and how often it has been done.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Subscription Database tables

There are a couple of tables in the database that handle the Outlook-CRM Syncronization and the offline sync. I havn't been able to find any further documentation on exactly how it works, but will publish any more info I find on the subject on this blog. There are mainly three normal tables concerned, namely:

Subscription
SubscriptionClients
SubscriptionSyncInfo

There are also several tables created for each user that contains their specific sync data. These are named:
SyncEntry_987F788E642CDB1184900007E94DD8DB

I would like to point out that these tables both contain info on Outlook-CRM sync and CRM Offline sync (ie Main SQL - MSDE sync).

If anyone has any more info on the subject, please contact me, I would like to discuss the matter.

If I find the time, I would like to research this a bit more. If I do, I'll let you know...

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Monday, September 11, 2006

JavaScripting and quick create forms
For you who haven't already noticed, if you create an OnLoad JavaScript for Account, Contact or any other entity and it includes some sort of defaulting of field values, if this field is not compulsory, it is not included in the quick create form, hence the onLoad event will send an error when the form is loaded. So, just check that it is there first :)

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, August 30, 2006

Developing Callouts
When developing callouts, many of you have probably gone mad by all the waiting due to the fact that the IIS has to be stoped and started between every compilation, and then most of the CRM application has to be recompiled again when you try to access the page. I have tried to find a good solution on how to bypass this, some including trying to shut down the AppPool instead of the IIS, but I couldn't get it to work.

This evening, I read a blog about how you can do it! This great guy has developed a small program that just calls your callout like the CRM normally does, only you can do it in your local computer instead! Great for debugging! A simple a ingeniuos solution, why didn't I think of that?

You can find it at: http://www.stunnware.com/crm2/topic.aspx?id=LocalCalloutDebugging

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se
On taking backup
When taking backup of your CRM system, to avoid any later problems consider the following:
- Take a complete backup of the xxxx_MSCRM database.
- Take a complete backup of the xxxx_METABASE.
- And just to be sure, export all customizations to an xml-file.
- Make a backup of the Microsoft CRM\Server\bin\assembly (normally found in Program Files)
- Make a backup of all custom aspx and html pages and code from the external website.

If you have any customizations what so ever, make sure you take a backup of the METABASE att same time as the MSCRM-database. If you do not, you might encounter inconsistencies at a later date which might be hard to fix. I'm planning on writing about what you do if this happens anyway.

If you have made any changes to the reports you should also backup the main SQL Reporting Services database, but hopefully have the rdl:s somewhere else aswell.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

MS Hotfixes

Maybe you've already been there, if not, you should, The Microsoft hotfixes for MS CRM 3.0 can be found here. Note that it is provided as-is, so read the text above the files before downloading anything!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tuesday, August 29, 2006

Limitations on Client side dublett handling

In the CRM SDK there is an example of how to create a dublett checker. It works fine but I would like to point out a few things.

  1. Note that it is based on JavaScript, hence it will only be used when the GUI is run. When running an import, for instance, the GUI is not used and the javascript will not be run.
  2. Perhaps a lead dubletthandler should also check for the existance of an account with the same name. It is only natural to check if the new lead might already be a customer.
  3. It cannot be used offline. Users should be notfiied of this or the function to create the entity should be disabled in offline mode.

To solve the first problem, the best cause of action is to make a callout-based dublett handler in addition to the javascript based. You don't want to throw that away since its user interface is a lot better than the callout-based checker.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Friday, August 25, 2006

What is the REAL error?

Finding what the real error is can sometimes be a bit tricky since the real error actually is embedded a bit down the exception hierachy. For instance, I recieved the following error when trying to send an email with the normal .NET mail classes using a workflow-dll.

Error code=8004280b. Unable to access the object CDO.Message.

I started thinking that there might be some different version between my local .NET and the server on where the program was run. I also thought there might be some problem with finding/accessing the dll. A bit weird but it had to be something.

However, after searching the internet I found that this error might not actually be the real error. Try recursing down into the exceptions to find the real error, and I did. With the following code:

try {
SmtpMail.Send(mail);
}
catch(Exception ex )
{
OutText("The following exception occurred: " + ex.ToString() ); //check the InnerException while( ex.InnerException != null )
{
OutText("--------------------------------");
OutText("The following InnerException reported: " + ex.InnerException.ToString() ); ex = ex.InnerException;
}
}

The output made me solve the problem in 5 sec, I had forgot to assign a to-adress in the mail. A weird error message for a simple and stupid error. So, from now on, I am always a bit sceptical on what error is shown and if it is the real error or not.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Off topic - ease your work with Remote Desktop

Many of you probably use Remote Desktop to connect to your clients computers. Sometimes you manage to lock the two sessions you are allowed and you can't reach the computer. What you need to do then is to connect using the console command. The easiest way to do this is to create a bat-file with the following content:
console.bat
========
mstsc %1 /console



Now, you just have to drag-n-drop the rdp-files on the batfile and the connection will be made using the /console and you can access the computer. No cmd-hacking, no remembering the syntax... just drag-n-drop! You have to be a local administrator to connect using /console, but arn't you always?

To log out the old connections, open the task manager and select the tab users. Mark the users that do not have id=0 (thats the console connection) and select logoff.

Hope it is usefull!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Thursday, August 24, 2006

Migration and the Migration Framework

The migration framework is based on a very good intention from MS since it can usually be a hassle. It is quite competent but has one great lack being that it only handled system entities and not cusomtized entities.

The feature of customizing entities is one of the greatest USP (unique selling points) for MS CRM, and being a system in directed at mid-market it is more than likely that a customer has to migrate from previous data, if only being excel, access or Outlook. To not support customized entities is a great flaw that severly limps the otherwise fine product.

If you need to migrate to MS CRM 3.0 and you are using customized entities there are two choices:
1. Make your own speciall program that communicated directly with the webservice.
2. Buy a third party product.

In most cases I think the later choice is best, there is a very good product called ImportManager Studio 2006 Professional made by the Danish company CRM Extensions. link.

Not only is this product good for migrations it is also replaces the very rudementary import function found in CRM. Other than being able to import data to custom entities, it can also store an import set-up to be used at a later date and link imported entities to eachother (like linking a contact with an account).

It is only €1700 which is quite cheap when you compare it to the costs of writing your own program.

It will be interesting to see if MS updates the migration framework to handle custom entities. Until then, count on paying €1700 for a product that can.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

On the IE bug again...

The bugg in IE described bellow will according to PC-World be corrected in an upcomming update of IE. Please see the article.

I would also lite to recommed the following Blog, where I noticed this.
Sonoma Partner Blog

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Tectura - CRM and Navision integrator

As many of you might know there is an integration product by the company Tectura to use for integration between MS CRM and Navision. I have been working with this and would like to share a few thoughts on this.

In general it works well when you get it installed properly, something you have to allocate quite a lot of time to. At least a couple of weeks.

It is, out-of-the-box, a technical integration of the products, i.e. it transfers information but implements very little business logic, something you have to add later. For instance if you block a product in Navision, this information is propagated to CRM to a field but it does not stop users from placing orders with the product.

The integration does not concern all entities. The integration mainly concerns account, orders, quotes. Products, Invoices and Units of Measure (and schedules) are sent from Nav to CRM but not back. Note that the integration does not treat contacts, pricelists, oppurtunities. Many salespeople also like to get information on the payment status of invoices. This is not included by default.

Summary being that Tectura is a good foundation for integration between CRM and Nav but be sure to note its limitations and make sure you have skilled CRM and Nav programmers to make the integration as tight as the customer most likely would like it to be.

I will probably blog some more on this subject later.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Wednesday, August 23, 2006

DevToolBar and style.display=none

There is a great tool from MS called the Developer Toolbar. It is great for finding parts of the GUI in CRM that you want to hide or change in some other way. To the download page

For instance, I wanted to block the use of write-in products. There is no security setting to use for this, so what you can do is write protect or hide the write-in product switch in the order view (and in quote and opportunity).

However, there is also a menu item for write-in products and it can't be disabled (as far as I know). So, by first, disabling appmode in web.config (should always be used when developing/customizing) and then accessing the orderform with the direct url: /SFA/salesorder/edit.aspx">http:///SFA/salesorder/edit.aspx you can browse the DOM-tree and will find that the menu item for Write-in products has the id: navWriteInProducts

Then in the onLoad event of Order, you just add the following:
navWriteInProducts.style.display = "none";
which simply removes the item from the menu when loading an order.

This is a simple way to modify items in CRM as long as they have an ID. It is quite common that customers want things to be hidden and defaulted, and this can't be done for some parts of CRM using normal customization. This method doesn't require any coding and will work.

Gustaf

IE problem

There is a known error in the latest update of IE and MS CRM. IE crashes when running CRM, I havn't been able to hone in to exactly when it crashes but it usually happens when you are using the drop-down-menus.

I will update this blog when I hear something new.

Gustaf

Wednesday, May 24, 2006

Welcome!

Well, I have set up my blog and will soon start blogging about CRM and SharePoint.

In the meantime, please visit my company's website at www.humandata.se, we have lot's of very talanted guys working for us. I would also like to recommend the guys at TruSec, www.trusec.se.

I also hang out a lot at IT-Proffs, www.itproffs.se, which is a Swedish Forum. Maybe it wont be very usable for any non-english speaking people but for swedes it's great!

See you around!