"Always start with where the error is, then what the error is" I am MVP, founder and CTO at CRM-Konsulterna AB a company specializing in only Microsoft Dynamics CRM.
Tuesday, October 31, 2006
Identity 2.0
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Friday, October 27, 2006
Impersonation - 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
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
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 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
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
AJAX Activity Indicators
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Wednesday, October 18, 2006
MS releases the specification for VHD
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Microsoft CRM Sandbox downloads
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Installation problems with Office sp2 and windows update
LINK
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Wednesday, October 11, 2006
Cloning objects in CRM
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
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
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
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
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