Want do check how a CRM installation is? Have a look at CRM Diag Tool at this webpage: http://blogs.msdn.com/benlec/archive/2007/06/06/new-crmdiagtoolturbo-3-0-5300-060607-uploaded-06-06-07.aspx
It helps you analyze a CRM installation. I havn't tried it yet but when I have I will tell you some more. I wrote this post just in case you didn't know it existed (like me).
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
"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.
Wednesday, June 20, 2007
Sunday, June 17, 2007
CRM with MapPoint
Integrating a map service into MS CRM with mesh-up technology is not very hard and can add very strong functionality to the users/customer. I havn't worked in a project yet that wanted this functionality which is the reason why I havn't blogged about it.
However, today I had a look at the CRM Team blog and found that Ayaz Ahmad, a CRM MVP has written a blog entry on how to make a simple CRM integration with Microsoft Mappoint.
Please have a look here if you are interested:
http://blogs.msdn.com/crm/archive/2007/06/14/microsoft-dynamics-crm-and-mappoint-integration-a-picture-is-worth-a-thousand-words.aspx
I am not sure how well MapPoint works in Europe/Northern Europe but I don't think integration with Google Earth (sorry MS, I know you hate them :) or other similar services (www.hitta.se, www.eniro.se) is very much harder as long as the do have a wsdl-webservice that can easily be consumed, or can easily be configured using URL-parameters.
Anyway, start off with MapPoint, if it doesn't go all the way for you, try working with some other Map Service supplier. There might also be some nice ActiveX-based map-service if a better map GUI is needed.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
However, today I had a look at the CRM Team blog and found that Ayaz Ahmad, a CRM MVP has written a blog entry on how to make a simple CRM integration with Microsoft Mappoint.
Please have a look here if you are interested:
http://blogs.msdn.com/crm/archive/2007/06/14/microsoft-dynamics-crm-and-mappoint-integration-a-picture-is-worth-a-thousand-words.aspx
I am not sure how well MapPoint works in Europe/Northern Europe but I don't think integration with Google Earth (sorry MS, I know you hate them :) or other similar services (www.hitta.se, www.eniro.se) is very much harder as long as the do have a wsdl-webservice that can easily be consumed, or can easily be configured using URL-parameters.
Anyway, start off with MapPoint, if it doesn't go all the way for you, try working with some other Map Service supplier. There might also be some nice ActiveX-based map-service if a better map GUI is needed.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
New CRM VPC
Well, my daughter is sleeping so I have some time to blog a bit and read some other blogs.
The so-called May-VPC containing a CRM Demo environment will soon be out-dated and a couple of guys are working on a new environment. It will contain SharePoint 2007, VS 2005 and a lot more which is good news, since it therefore can be used for demos, education and simple development projects (larger development projects should be based on an empty CRM, with some customer specific data). I am looking forward to it! Read a bit more about it on Mennotk's blog: http://blogs.msdn.com/mscrmfreak/archive/2007/06/12/new-microsoft-dynamics-crm-vpc-update.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
The so-called May-VPC containing a CRM Demo environment will soon be out-dated and a couple of guys are working on a new environment. It will contain SharePoint 2007, VS 2005 and a lot more which is good news, since it therefore can be used for demos, education and simple development projects (larger development projects should be based on an empty CRM, with some customer specific data). I am looking forward to it! Read a bit more about it on Mennotk's blog: http://blogs.msdn.com/mscrmfreak/archive/2007/06/12/new-microsoft-dynamics-crm-vpc-update.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Friday, June 15, 2007
Off topic: I am now a father!
17:03 on the 12:th of june, my wife gave birth to my first child, a beautiful little girl! She has been named Liv Nora Hogseth Westerlund, Nora being her primary name.
So, if you find this blog to be a bit slow the next few weeks, please have a look at the pictures at my private website www.westerlund.info, and you will understand why this is so.
Gustaf Westerlund
Father & CRM and SharePoint Consultant
Humandata AB
www.humandata.se
So, if you find this blog to be a bit slow the next few weeks, please have a look at the pictures at my private website www.westerlund.info, and you will understand why this is so.
Gustaf Westerlund
Father & CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Monday, June 11, 2007
How to customize search in SharePoint
Patrick Tissegheim, a very competent SharePoint MVP at U2U has made a very good video presentation of how to customize search in SharePoint. He works with the tabbed searching and shows how to create your own search page, search result page and how to use SharePoint Designer GUI to create the XSLT used to show the result of a search. Very nice, if you havn't seen it, you should.
http://msdn2.microsoft.com/en-us/library/bb428855.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
http://msdn2.microsoft.com/en-us/library/bb428855.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
SharePoint links
Looking for some good links to SharePoint related material, have a look bellow:
SharePoint whitepapers:
http://www.combined-knowledge.com/Downloads%202007.htm
Office SharePoint Server 2007 on TechNet
http://technet2.microsoft.com/Office/en-us/library/5233cf43-6a8f-40cb-9014-0724600e7e381033.mspx?mfr=true
Microsoft Office Systems for Architects
http://msdn2.microsoft.com/sv-se/architecture/aa699381.aspx
Application Templates
http://www.microsoft.com/technet/windowsserver/sharepoint/wssapps/templates/datasheets.mspx
I will publish more when I find anything useful!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
SharePoint whitepapers:
http://www.combined-knowledge.com/Downloads%202007.htm
Office SharePoint Server 2007 on TechNet
http://technet2.microsoft.com/Office/en-us/library/5233cf43-6a8f-40cb-9014-0724600e7e381033.mspx?mfr=true
Microsoft Office Systems for Architects
http://msdn2.microsoft.com/sv-se/architecture/aa699381.aspx
Application Templates
http://www.microsoft.com/technet/windowsserver/sharepoint/wssapps/templates/datasheets.mspx
I will publish more when I find anything useful!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Dynamics on MSDN
Dynamics (the product family of which CRM is part), now has it's own corner in MSDN. Please have a look:
http://msdn2.microsoft.com/en-us/dynamics/default.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
http://msdn2.microsoft.com/en-us/dynamics/default.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Tuesday, June 05, 2007
Reports.config has invalid schema
I was working with setting up a demo/lab environment with SQL 2005, MOSS Ent 2007 and MS CRM 3, Office 2007 Ultimate.
However, I had problems getting the reports to work, when trying to access the reportpage, I got the error: "Reports.config has invalid schema".
I looked around a bit on the net and found that one of the blogs I suibscribe to actually discussed the problem at hand.
http://blogs.msdn.com/mscrmfreak/archive/2006/05/17/599371.aspx
It seemed that the reason for the error was that .NET 2.0 had been defaultet for the CRM 3 website (and we all know it is .NET 1.1, right!). So, tried to run "aspnet_regiis -r" as described but I got the same error as the comment by "Matt Thomas", my CRM just stopped working.
So, what to do. I found that when you run "aspnet_regiis -r" it resetts all websites to the version of .NET that you run it from (ex. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -r, will set all websites to use .NET 1.1). This is not desirable since my MOSS 2007, SQL 2005 RS and all MOSS admin sites (central admin, my site, SSP) all should run .NET 2.0. So, I thought it better to reset all sites to .NET 2.0 and then manually set the CRM site to 1.1. And so I did, and CRM just stalled when loading. No error message, no nothn'!
This got me thinking that you should be able to run one version of aspnet_regiis for just one website. So, by trying the all-usefull "/?" parameter I found that using "aspnet_regiis -lk" will list all different IIS-paths and show which version they were running. This was what I found:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>aspnet_regiis -lk
W3SVC/ 2.0.50727.42W3SVC/1/ROOT/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/images/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/inc/ 2.0.50727.42
W3SVC/131316714/root/ 2.0.50727.42
W3SVC/131316714/root/Reports/ 2.0.50727.42
W3SVC/131316714/root/ReportServer/ 2.0.50727.42
W3SVC/1720207907/root/ 2.0.50727.42
W3SVC/2/ROOT/ 1.1.4322.0
W3SVC/2/ROOT/MSCRMServices/ 2.0.50727.42
W3SVC/2075257487/Root/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/images/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/inc/ 2.0.50727.42
W3SVC/425288717/Root/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/images/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/inc/ 2.0.50727.42
W3SVC/493651791/Root/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/images/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/inc/ 2.0.50727.42
Aha! Can you see what is wrong? Well, when I manually set CRM to .NET 1.1 it didn't do that recursivly! The CRM webservice is running as a separate application, and I hadn't changed that. This is the row that shows what's wrong:
W3SVC/2/ROOT/MSCRMServices/ 2.0.50727.42
So, I checked what parameters you could use with aspnet_regiis and found that "-s" seemed like a good idea. Hence, I ran:
aspnet_regiis -s W3SVC/2/ROOT
I think it might just have worked with going in to the CRM site and changing it for the MSCRMService virtual directory, but I thought it better to set it to the entire MS CRM 3 website recursivly to make sure everything was ok. When it had completed (takes a minute or two), I ran "aspnet_regiis -lk" again to check the current status:
W3SVC/ 2.0.50727.42W3SVC/1/ROOT/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/images/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/inc/ 2.0.50727.42
W3SVC/131316714/root/ 2.0.50727.42
W3SVC/131316714/root/Reports/ 2.0.50727.42
W3SVC/131316714/root/ReportServer/ 2.0.50727.42
W3SVC/1720207907/root/ 2.0.50727.42
W3SVC/2/ROOT/ 1.1.4322.0
W3SVC/2/ROOT/MSCRMServices/ 1.1.4322.0
W3SVC/2075257487/Root/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/images/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/inc/ 2.0.50727.42
W3SVC/425288717/Root/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/images/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/inc/ 2.0.50727.42
W3SVC/493651791/Root/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/images/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/inc/ 2.0.50727.42
As you can see, the MSCRMService is now also .NET 1.1.
After this I restarted the IIS with "iisreset", and tried to run CRM and the reports;
Everything worked as it should!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
However, I had problems getting the reports to work, when trying to access the reportpage, I got the error: "Reports.config has invalid schema".
I looked around a bit on the net and found that one of the blogs I suibscribe to actually discussed the problem at hand.
http://blogs.msdn.com/mscrmfreak/archive/2006/05/17/599371.aspx
It seemed that the reason for the error was that .NET 2.0 had been defaultet for the CRM 3 website (and we all know it is .NET 1.1, right!). So, tried to run "aspnet_regiis -r" as described but I got the same error as the comment by "Matt Thomas", my CRM just stopped working.
So, what to do. I found that when you run "aspnet_regiis -r" it resetts all websites to the version of .NET that you run it from (ex. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -r, will set all websites to use .NET 1.1). This is not desirable since my MOSS 2007, SQL 2005 RS and all MOSS admin sites (central admin, my site, SSP) all should run .NET 2.0. So, I thought it better to reset all sites to .NET 2.0 and then manually set the CRM site to 1.1. And so I did, and CRM just stalled when loading. No error message, no nothn'!
This got me thinking that you should be able to run one version of aspnet_regiis for just one website. So, by trying the all-usefull "/?" parameter I found that using "aspnet_regiis -lk" will list all different IIS-paths and show which version they were running. This was what I found:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>aspnet_regiis -lk
W3SVC/ 2.0.50727.42W3SVC/1/ROOT/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/images/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/inc/ 2.0.50727.42
W3SVC/131316714/root/ 2.0.50727.42
W3SVC/131316714/root/Reports/ 2.0.50727.42
W3SVC/131316714/root/ReportServer/ 2.0.50727.42
W3SVC/1720207907/root/ 2.0.50727.42
W3SVC/2/ROOT/ 1.1.4322.0
W3SVC/2/ROOT/MSCRMServices/ 2.0.50727.42
W3SVC/2075257487/Root/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/images/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/inc/ 2.0.50727.42
W3SVC/425288717/Root/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/images/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/inc/ 2.0.50727.42
W3SVC/493651791/Root/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/images/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/inc/ 2.0.50727.42
Aha! Can you see what is wrong? Well, when I manually set CRM to .NET 1.1 it didn't do that recursivly! The CRM webservice is running as a separate application, and I hadn't changed that. This is the row that shows what's wrong:
W3SVC/2/ROOT/MSCRMServices/ 2.0.50727.42
So, I checked what parameters you could use with aspnet_regiis and found that "-s
aspnet_regiis -s W3SVC/2/ROOT
I think it might just have worked with going in to the CRM site and changing it for the MSCRMService virtual directory, but I thought it better to set it to the entire MS CRM 3 website recursivly to make sure everything was ok. When it had completed (takes a minute or two), I ran "aspnet_regiis -lk" again to check the current status:
W3SVC/ 2.0.50727.42W3SVC/1/ROOT/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/images/ 2.0.50727.42
W3SVC/1/ROOT/_layouts/inc/ 2.0.50727.42
W3SVC/131316714/root/ 2.0.50727.42
W3SVC/131316714/root/Reports/ 2.0.50727.42
W3SVC/131316714/root/ReportServer/ 2.0.50727.42
W3SVC/1720207907/root/ 2.0.50727.42
W3SVC/2/ROOT/ 1.1.4322.0
W3SVC/2/ROOT/MSCRMServices/ 1.1.4322.0
W3SVC/2075257487/Root/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/images/ 2.0.50727.42
W3SVC/2075257487/Root/_layouts/inc/ 2.0.50727.42
W3SVC/425288717/Root/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/images/ 2.0.50727.42
W3SVC/425288717/Root/_layouts/inc/ 2.0.50727.42
W3SVC/493651791/Root/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/images/ 2.0.50727.42
W3SVC/493651791/Root/_layouts/inc/ 2.0.50727.42
As you can see, the MSCRMService is now also .NET 1.1.
After this I restarted the IIS with "iisreset", and tried to run CRM and the reports;
Everything worked as it should!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
SQL Server 2008
Microsoft are planning to release a new version of SQL Server next year that will be called Microsoft SQL Server 2008.
It hosts lots of new features, for instance the ability to work directly with entities in the database instead of tables and views. An interesting feature, I wonder how good it will be.
SQL Reports will also be better and the integration with MS Office system (=SharePoint?) has be enhanced.
Have a look at Microsofts website for SQL Server 2008 for more information and some videos.
http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
It hosts lots of new features, for instance the ability to work directly with entities in the database instead of tables and views. An interesting feature, I wonder how good it will be.
SQL Reports will also be better and the integration with MS Office system (=SharePoint?) has be enhanced.
Have a look at Microsofts website for SQL Server 2008 for more information and some videos.
http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Saturday, June 02, 2007
MOM Pack
Microsoft Operations Management (or similar programs) is a program that every serious IT-department runns to make sure all servers, clients and applications run as they should. Microsoft has release a MOM-pack for CRM so, if you want to monitor what CRM is or isn't doing, I suggest you have a look at it!
http://blogs.msdn.com/crm/archive/2007/06/01/released-microsoft-dynamics-crm-3-server-management-pack-for-mom-2005.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
http://blogs.msdn.com/crm/archive/2007/06/01/released-microsoft-dynamics-crm-3-server-management-pack-for-mom-2005.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Friday, June 01, 2007
Backup of SharePoint
Backing up SharePoint is not just backing up the databases and hoping for the best. Best Practice is actually using the tool stsadm and create backupfiles that can be then be backed up to tape (or similar). So, how to create a script that takes backup?
Example of script for catastrophic backup:
@echo offecho start Catastrophic backup >> backup.log
date /t >> backup.log
time /t >> backup.log
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm" -o backup -directory \\srv01\Backup\CatastrophicBackup -backupmethod full >> backup.log
date /t >> backup.log
time /t >> backup.log
echo end Catastropic backup >> backup.log
This will create a new folder in the directory \\srv01\Backup\CatastrophicBackup where backup of all databases will be done.
However, the problem with this is that you can't restore just one file... so what to do?
Two alternatives:
1. Just export all site data to file using "stsadm -o export", and when needed, restore to secondary sharepoint (not public) and retrieve file.
2. Use 3:rd party backup solution like DocAve 4.1 by AvePoint that has single-item-restore.
An example of how to uses stsadm for creating a normal export is:
stsadm -o export -url http://portal -filename "\\srv1\Backup\portal.bak" -version 4
This will export everything from http://portal to \\srv1\backup\portal.bak including all versions of all files. Please note that if you have lots of data, it might take som time to do this.
Note that there is also a version of "stsadm -o backup" that backs up entire sitecollections but for "simpler" backup set ups I don't find that necessary.
Also note that this is how you handle backup for smaller installations where you can acctually run an export of all data each night. For larger installations, more complex backup methods based on incremental backup or snapshotting can be used.
Since we're using sharepoint for backing up, we don't really have any need for maintaining transactionlogs in SQL server som make sure you have selected "Simple Recovery Model" for each SharePoint database.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Example of script for catastrophic backup:
@echo offecho start Catastrophic backup >> backup.log
date /t >> backup.log
time /t >> backup.log
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm" -o backup -directory \\srv01\Backup\CatastrophicBackup -backupmethod full >> backup.log
date /t >> backup.log
time /t >> backup.log
echo end Catastropic backup >> backup.log
This will create a new folder in the directory \\srv01\Backup\CatastrophicBackup where backup of all databases will be done.
However, the problem with this is that you can't restore just one file... so what to do?
Two alternatives:
1. Just export all site data to file using "stsadm -o export", and when needed, restore to secondary sharepoint (not public) and retrieve file.
2. Use 3:rd party backup solution like DocAve 4.1 by AvePoint that has single-item-restore.
An example of how to uses stsadm for creating a normal export is:
stsadm -o export -url http://portal -filename "\\srv1\Backup\portal.bak" -version 4
This will export everything from http://portal to \\srv1\backup\portal.bak including all versions of all files. Please note that if you have lots of data, it might take som time to do this.
Note that there is also a version of "stsadm -o backup" that backs up entire sitecollections but for "simpler" backup set ups I don't find that necessary.
Also note that this is how you handle backup for smaller installations where you can acctually run an export of all data each night. For larger installations, more complex backup methods based on incremental backup or snapshotting can be used.
Since we're using sharepoint for backing up, we don't really have any need for maintaining transactionlogs in SQL server som make sure you have selected "Simple Recovery Model" for each SharePoint database.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
CRM BizTalk Adaptor - How To
As you might be aware, there is a BizTalk Adaptor for Microsoft CRM 3. I havn't spoken to anyone who has tried it but I just found a nice blog that describes a lot about how to set it up. It is focused for BizTalk experts, but can be very helpful to get a BizTalk CRM integration project started. Have a look and judge for your self:
http://blogs.msdn.com/brajens/archive/2007/05/27/using-microsoft-biztalk-dynamics-crm-adapter-part-1.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
http://blogs.msdn.com/brajens/archive/2007/05/27/using-microsoft-biztalk-dynamics-crm-adapter-part-1.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Wednesday, May 30, 2007
Showing related forms
One thing I appreciate about good blogs is the viral spreading of interesting stuff, so that good solutions arn't just available in some corner of the world, but can be used all over. I believe this is one of the real assets of working with the great products MS CRM and MS SharePoint.
I try to keep track of quite a few different blogs and when I find something interesting I (as you have seen before) usually add a posting linking to this blog. This way, I hope you will find my blog even more usefull since you shouldn't really need to keep track of all blogs yourself. (if your interests match mine, that is of course)
On one of the blogs I subscribe to, I found an interesting post concerning how to add related forms into existing forms in MS CRM. This can be very usefull when customers demand GUI modification. So, please have a look: http://blogs.msdn.com/mscrmfreak/archive/2007/05/30/ui-customizations-on-your-coffee-break.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
I try to keep track of quite a few different blogs and when I find something interesting I (as you have seen before) usually add a posting linking to this blog. This way, I hope you will find my blog even more usefull since you shouldn't really need to keep track of all blogs yourself. (if your interests match mine, that is of course)
On one of the blogs I subscribe to, I found an interesting post concerning how to add related forms into existing forms in MS CRM. This can be very usefull when customers demand GUI modification. So, please have a look: http://blogs.msdn.com/mscrmfreak/archive/2007/05/30/ui-customizations-on-your-coffee-break.aspx
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Kerberos / Trust Delegation
As some of you might have experienced the easiest way to deploy MS CRM 3 is to have SQL Server and SQL RS on the same machine, this will let you duck from a lot of problems, so if you don't know better and have no reason not to, choose this setup.
However, this is not always what is best. The most common scenario when this is not the case is when a company has a large SQL Cluster (or just a dedicated SQL Server) and for several reasons (mainly licensing and maintance) want to have the CRM database and CRM reports on the central SQL server. Now, I am not an expert at this, but I have tried to dive in to it a bit and I have found the following:
If you are running the application pool of CRM, application pool of SQL RS and the main SQL server as Network Service, you will usually be fine, it will probably work more or less out of the box.
However, if not, you will get a warning in the installation of CRM saying something like "SPN not set correctly" for SQL RS. You can, if you like, install CRM anyway, but reports will only work when running them directly using Report Manager/Report Server or when running IE from the CRM server. Since it is not best practice to have the CRM server double as a terminal server, this is not often very nice.
So, what's wrong? The problem lies in that all requests from SQL RS to the SQL database, are done using the technique "impersonation" which means that all requests in the database are run as the "current user"/the user that is running IE. This is a very good feature since it among other things enables the Filtered Views in the SQL database the only returns the items that the current user has access to. The problem is that CRM is acting HTTP proxy for the SQL RS and as such cannot send the current users credentials to the Report Server.
What needs to be done? Well, the CRM server user must be set up to enable trust delegation (i.e. forwarding of credentials) and the service users running the CRM apppool, SQL RS app pool and SQL must have the correct SPN:s set for them.
There are several documents and blogs describing how this can be set up, Sonoma Partner has one and the document with the short title: Additional Tasks When Microsoft SQL Reporting Services is installed on a separate server from Microsoft CRM or Microsoft SQL Server by Microsoft is also a good help.
The biggest problem usually is that you will have to run the "setspn" tool on the service account that is running the SQL Cluster/dedicated SQL machine and even though that shouldn't cause any problems, if it does, and you are running x number of business critical applications on the SQL server, you might be in for a long night...
My suggestion is that you first try to set this up in a demo environment and when you got it working, then redo it on the live environment on a late friday afternoon, and make sure you havn't got anything planned for the weekend...
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
However, this is not always what is best. The most common scenario when this is not the case is when a company has a large SQL Cluster (or just a dedicated SQL Server) and for several reasons (mainly licensing and maintance) want to have the CRM database and CRM reports on the central SQL server. Now, I am not an expert at this, but I have tried to dive in to it a bit and I have found the following:
If you are running the application pool of CRM, application pool of SQL RS and the main SQL server as Network Service, you will usually be fine, it will probably work more or less out of the box.
However, if not, you will get a warning in the installation of CRM saying something like "SPN not set correctly" for SQL RS. You can, if you like, install CRM anyway, but reports will only work when running them directly using Report Manager/Report Server or when running IE from the CRM server. Since it is not best practice to have the CRM server double as a terminal server, this is not often very nice.
So, what's wrong? The problem lies in that all requests from SQL RS to the SQL database, are done using the technique "impersonation" which means that all requests in the database are run as the "current user"/the user that is running IE. This is a very good feature since it among other things enables the Filtered Views in the SQL database the only returns the items that the current user has access to. The problem is that CRM is acting HTTP proxy for the SQL RS and as such cannot send the current users credentials to the Report Server.
What needs to be done? Well, the CRM server user must be set up to enable trust delegation (i.e. forwarding of credentials) and the service users running the CRM apppool, SQL RS app pool and SQL must have the correct SPN:s set for them.
There are several documents and blogs describing how this can be set up, Sonoma Partner has one and the document with the short title: Additional Tasks When Microsoft SQL Reporting Services is installed on a separate server from Microsoft CRM or Microsoft SQL Server by Microsoft is also a good help.
The biggest problem usually is that you will have to run the "setspn" tool on the service account that is running the SQL Cluster/dedicated SQL machine and even though that shouldn't cause any problems, if it does, and you are running x number of business critical applications on the SQL server, you might be in for a long night...
My suggestion is that you first try to set this up in a demo environment and when you got it working, then redo it on the live environment on a late friday afternoon, and make sure you havn't got anything planned for the weekend...
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Avoiding IIS Reset
Both in SharePoint development and CRM development, IISReset is needed sometimes to release fileholds. For instance, when developing callouts in MS CRM, the callout.config file will be blocked (by w3wp-crmapppool) as soon as a callout has been run.
The biggest problem with IISReset (or shuting the IIS down, compiling, restarting it) is that the entire application will be "just-in-time-compiled" each time, taking huge amounts of time especially when developing on virtual pc:s with only 1 GB (or less) of memory.
The workaround for this is to recycle the application pool for the IIS-website instead of restarting the entire IIS.
The easiest way of doing this is to right-click on the applicationpool and the choose "recycle".
This can be scripted (as described on Patrick Tissegheims blog) by using the script:
cscript c:\windows\system32\iisapp.vbs /a "SharePointDefaultAppPool" /r
Or as Patrick also mentions, there is a good tool for doing this, that can be found here:
http://www.harbar.net/articles/APM.aspx
So, that might easy your troubles, and save you some time.
If you are compiling on the server, my suggestion is to add the script to the pre build events in the project.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
The biggest problem with IISReset (or shuting the IIS down, compiling, restarting it) is that the entire application will be "just-in-time-compiled" each time, taking huge amounts of time especially when developing on virtual pc:s with only 1 GB (or less) of memory.
The workaround for this is to recycle the application pool for the IIS-website instead of restarting the entire IIS.
The easiest way of doing this is to right-click on the applicationpool and the choose "recycle".
This can be scripted (as described on Patrick Tissegheims blog) by using the script:
cscript c:\windows\system32\iisapp.vbs /a "SharePointDefaultAppPool" /r
Or as Patrick also mentions, there is a good tool for doing this, that can be found here:
http://www.harbar.net/articles/APM.aspx
So, that might easy your troubles, and save you some time.
If you are compiling on the server, my suggestion is to add the script to the pre build events in the project.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Tuesday, May 29, 2007
Untrack email in Outlook (V3C)
It is easy to track emails in Outlook which adds them to CRM. However, if an email linked to the wrong object, it is not as easy to "untrack" an email. Sonoma Partner blog describes how to do it, have a look: http://blog.sonomapartners.com/2007/05/remove_crm_link.html
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
How to mass import lots of mails
This blog posting shows how to add lots of emails to CRM that do not have a tracking token.
One issue with this solution is that many emails should still be added to specific accounts, orders, incidents etc. There is no simple solution but I would use the advanced search and bulk edit function to set the "regarding" field of all emails.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
One issue with this solution is that many emails should still be added to specific accounts, orders, incidents etc. There is no simple solution but I would use the advanced search and bulk edit function to set the "regarding" field of all emails.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Monday, May 28, 2007
Net stop / Net start
Developing lots of workflow dll:s? Add the following text to the prebuild events (if you are developing on the server):
net stop "Microsoft CRM Workflow Service"
and then
net start "Microsoft CRM Workflow Service"
which will save you the time of turning the Workflow-service off and on manually with each compilation.
If it is a live server, make sure you understand the complications!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
net stop "Microsoft CRM Workflow Service"
and then
net start "Microsoft CRM Workflow Service"
which will save you the time of turning the Workflow-service off and on manually with each compilation.
If it is a live server, make sure you understand the complications!
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Creating CRM-emails in C# code
I have in a previuos post described how to programmatically download a SQL RS report, create a CRM email and attach the report as a pdf to it and send it. This is quite many steps and sometimes it will just be good enough to send mails, for instance when developing addons for workflows.
email em = new email();
activityparty fromparty = new activityparty();
fromparty.partyid = new Lookup();
fromparty.partyid.type = EntityName.systemuser.ToString(); //Change to some other entity if needed.
fromparty.partyid.Value = FROM-SYSTEMUSER-GUID;
em.from = new activityparty[] { fromparty };
activityparty toparty = new activityparty();
toparty.partyid = new Lookup();
toparty.partyid.type = EntityName.contact.ToString(); //Change to some other entity if needed
toparty.partyid.Value = TO-CONTACT-GUID;
em.to = new activityparty[] { toparty };
em.subject = SUBJECT-STRING;
em.sender = "crm@example.com";
em.regardingobjectid = new Lookup();
em.regardingobjectid.type = EntityName.REGARDING ENTITY TYPE.ToString();
em.regardingobjectid.Value = REGARDING OBJECT GUID;
em.description = BODY-STRING;
em.ownerid = new Owner();
em.ownerid.type = EntityName.systemuser.ToString();
em.ownerid.Value = OWNER-SYSTEMUSER-GUID;
Guid createdEmailGuid = service.Create(em);
SendEmailRequest req = new SendEmailRequest();
req.EmailId = createdEmailGuid;
req.TrackingToken = "";
req.IssueSend = true;
// Send the email message.
SendEmailResponse res = (SendEmailResponse)service.Execute(req);
I find this code very helpfull. It can probably be generalized by using BusinessEntity object and so forth but I am usually quite satisfied with this.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
email em = new email();
activityparty fromparty = new activityparty();
fromparty.partyid = new Lookup();
fromparty.partyid.type = EntityName.systemuser.ToString(); //Change to some other entity if needed.
fromparty.partyid.Value = FROM-SYSTEMUSER-GUID;
em.from = new activityparty[] { fromparty };
activityparty toparty = new activityparty();
toparty.partyid = new Lookup();
toparty.partyid.type = EntityName.contact.ToString(); //Change to some other entity if needed
toparty.partyid.Value = TO-CONTACT-GUID;
em.to = new activityparty[] { toparty };
em.subject = SUBJECT-STRING;
em.sender = "crm@example.com";
em.regardingobjectid = new Lookup();
em.regardingobjectid.type = EntityName.REGARDING ENTITY TYPE
em.regardingobjectid.Value = REGARDING OBJECT GUID
em.description = BODY-STRING;
em.ownerid = new Owner();
em.ownerid.type = EntityName.systemuser.ToString();
em.ownerid.Value = OWNER-SYSTEMUSER-GUID;
Guid createdEmailGuid = service.Create(em);
SendEmailRequest req = new SendEmailRequest();
req.EmailId = createdEmailGuid;
req.TrackingToken = "";
req.IssueSend = true;
// Send the email message.
SendEmailResponse res = (SendEmailResponse)service.Execute(req);
I find this code very helpfull. It can probably be generalized by using BusinessEntity object and so forth but I am usually quite satisfied with this.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Thursday, May 24, 2007
Getting lots of copies of your mails
The new feature of email enabled document libraries in SharePoint 3 is great, but I recently experienced problems with getting a new copy of the mail every five/ten minutes. After a bit of error searching, I found that it was due to the fact that SharePoint didn't have delete access rights to the "drop" folder in the c:\inetpub\mailroot directory, hence after sharepoint has read the mail, it can't delete it. The next time sharepoint polls the directory, it will find the same mail and add it again, and again, and again... so just make sure the access rights are right.
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Gustaf Westerlund
CRM and SharePoint Consultant
Humandata AB
www.humandata.se
Subscribe to:
Posts (Atom)