09 augMicrosoft Dynamics CRM 4.0 errorcodes–Troubleshooting

A big part of my work is in the Incident management field. One of the products I work a lot with is Microsoft Dynamics CRM 4.0. The objective of this post is to give some quick tips and pointers on how to troubleshoot those incidents.

Security Roles
First thing is the ability of reproduction on the CRM environment. Does the same user have the issue in a certain situation. The user context plays a big role in that. From which business unit is the user part of. And what kind of security roles and the access levels on the different privileges always does he or she have? The Microsoft Dynamics CRM 4.0 priviliges by entity Technet article is a good resource.

Tracing
If I can reproduce the incident my next step is always taking a peak in tracing. Of course you should have tracing enabled at that point, in Microsoft knowledge base article 907490 you can find an explanation on how to enable it.

Error codes
There are lots of Error codes, 1359 to be exactly. A complete Microsoft Dynamics CRM 4.0 Error code list can be found on MSDN. You can also download it as an worksheet in the  Most common error code I have seen so far was the 0×80040220 – PrivilegeDenied – The user does not hold the necessary privileges. The user doesn’t have the right access level to complete the the operation. The only problem with Microsoft Dynamics CRM 4.0 is that they write it like that in the log.  

Crm Exception: Message: SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 2c3519fc-f322-df11-ada7-00155d961205 and PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3, ErrorCode: –2147220960

You notice three things in the exception:
User: 2c3519fc-f322-df11-ada7-00155d961205
PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3
ErrorCode: –2147220960

To figure out which user you are looking at in the error is easy. The user name is easy to get from the interface. Log on as and system administrator on your Microsoft Dynamics CRM 4.0 installation. Navigate to Settings > Administration > Users. Open a random user record, a dialog will open. Press F11, you will see a following kind of url: https://url/OrganizationName/biz/users/edit.aspx?id={RandomUserGuid}. Replace the RandomUserGuid with the GUID from the Crm Exception.

PrivilegeId can be a little bit more tricky. It depends if the privilege is from a custom entity or a standard entity. Standard entities can be found in the earlier mentioned Microsoft Dynamics CRM 4.0 priviliges by entity article on Technet. But if you don’t like clicking through you can use a free tool like Find Privilege from Mitch Milam.

For the conversion of the Error Code you can use the calculator on your desktop. Follow the instruction of David Jennaway in his CRM Error Codes blogpost. In the Software Development Kit you also have a Crmhelpers folder which contains the error codes, you can download the latest Microsoft Dynamics CRM 4.0 Software Development Kit on Microsoft Download Center.

Hopefully this will give you some inside on Microsoft Dynamics CRM 4.0 incident troubleshooting. In next version CRM 2011 they have made it a bit more administrator friendly, so more on that to come!

26 febSecurity Exception

Gonna try and post some more troubleshooting articles, just like my colleague Michaël. This time an article about a problem in Microsoft Office SharePoint Server 2007.

The problem
A customer came across a security exception error. But it didn’t always show up. Turned out it only showed when she was routed to a certain Web Front End, WFE02. You can see the error below in a screenshot.
SecurityException

The cause
The application wanted to write an event in the event log of WFE02 but wasn’t able to because the event source doens’t exist. It also doesn’t have rights to create the event source. That is why it is throwing an exception.

The solution
Temporarely give the application pool account that is used as identity of the web application local administrator rights on the WFE02.

1. Find out what the application pool identity is from your SharePoint web application. Go to IIS manager in administrative tools or type the command inetmgr in the run box.
IISmanagerapplicationpoolidentity
2. Go to Server Manager in administrative tools. Open the Configuration tab and go to Local Users and Groups and go to the Administrators Group.
AddApplicationPoolIDtoLocalAdmins
3. IISreset the web front end by typing the command iisreset in the run box.
IISreset
4. Remove the application pool identity from the administrators group.

Now the event source can be created and the items will be posted in the event log. The customer will see the .aspx page again.

In this case it turned out to be that the application wanted to write information events in the event log. Can be really annoying if your application won’t run right because of some information logs.

31 decIncident management: Creating an incident

Since a while I’ve been working with a new Microsoft product from the System Center family called Service Manager 2010. I’ve been putting a lot of time and effort in using it and I wanted to share this with you. So from now on I’m gonna write some blogposts about it. I’m gonna try to do this in a persona-scenario kind of way. But one step back, what the heck is Service Manager 2010 anyway? I can write a whole definition about it but Microsoft also has a clear one:

System Center Service Manager 2010
Microsoft System Center Service Manager is an integrated platform for automating and adapting your organization’s IT service management best practices, such as those found in Microsoft Operations Framework (MOF) and Information Technology Infrastructure Library (ITIL). It provides built-in processes for incident and problem resolution, change control, and asset lifecycle management. Through its configuration management database (CMDB) and process integration, Service Manager automatically connects knowledge and information from System Center Operations Manager, System Center Configuration Manager and Active Directory.

Source: Microsoft

First of all what I want to do is show you part of SCSM 2010 and what it does out of the box. My first focus will be on working with incidents in SCSM 2010. In SCSM 2010 they have delivered an incident management pack based on best practices like MOF and ITIL. A high level overview about incident management is written by Ketan Ghelani overhere.

I’m using the following personas and scenario for this. I have used the Microsoft Dynamics Customer model for this.

Personas
Lisa – Customer Service Representative
Charlie – Customer

Scenario #001 – Lisa creates an incident
Lisa gets a call from Charlie at the Helpdesk number. Charlie tells Lisa that he isn’t able to use his e-mail. This is already the second time this happened. Last time a colleague from Lisa helped him with that incident. Charlie also tells Lisa that he is away for the next few days and that he is only available via landline number +1 123 456 789

Like you see above, this is not the most interesting scenario. But it does give you a first idea of what kind of interface we are dealing with. So this is the main reason why I’m posting this, showing you the User experience of SCSM 2010.

Lisa executes the following steps in this scenario:
1. Log on to the SCSM 2010 console
2. Create an incident & fill in the details
3. Relate an older incident
4. Activate the incident & watch it in the incident overview

1. Log on to the SCSM 2010 console
This is of course the most basic step. I added this one to still give you an idea what you will experience when first opening the console.
Connect to Service Manager ServerLisa connects with her credentialsThis is the landing page after you log on. First look on the interface, very similar to other products in the System Center family like SCOM or SCCM

2. Create an incident & fill in the details
Most important part of this step is to view the interface. There are a few important parts in the interface of creating a work item, in this case an incident. You have a status part on top of your screen, tabs with information about your work item and a tasks pane on the right to do something with the work item.
Lisa is gonna add a new incident. This is a work item, click the work item menu bar, or wunderbar as they like to call itLisa selects the Incident Management folder. You see on the right a create incident option in the task paneIt is also possible to create an incident from within the folder, via a right mouse actionA form opens in which Lisa can fill in the incident details. This is the template for a standard incident delivered out of the box in the SCSM 2010 incident management pack. Notice a few areas like the status bar on top, task pane on right & the tabs
Lisa can fill in the affected user, this can be someone from an Active Directory imported with a connector or CSV or just created manuallyLisa can also use dropdown lists in a template, out of the box it is user for fields like category, source, etc.Lisa can also add the affected service, in this case probably an exchange accountAfter Lisa filled in all the information of the incident notice how the top bar is filled with information Incident number, Status, Affected user, Main contact info, Created on, Resolved by & Time worked

3. Relate an older incident
One of the features in this management pack and the product itself is that you can relate a lot of stuff to a work item. In this scenario I’m showing you how to relate another incident to this current incident.
The second tab is the activities tab, you can add activities which are related to this incident. This can be a custom one, or base on pre-defined templated. We are not gonna use this in this scenarioLisa adds a related work item, in this case Lisa adds the previous incident with user e-mail which was created for CharlieResolution tab, is primarily used by the persona who is gonna solve this case, so Lisa doesn't use this tab in this scenarioHistory tab, nice overview of what has happened with this work item. In this scenario we also not using it.

4. Activate the incident & watch it in the incident overview
Like I stated in one the previous screenshots SCSM 2010 is working with folders and views to show work items. I wanted to show the end result to also give you an overview of this interface.
If you now go to all incidents view you will see the new created incident by LisaThe my incidents view, which shows all the incidents of the current logged on user, in this case Lisa

So this is a quick overview of how to register a incident and in general a work item in System Center Service Manager 2010. If you have some questions or feedback feel free to comment in the section below. I will post some new scenarios soon.

Sources:
Microsoft Service Manager product page
High level overview incident management written by Ketan Ghelani on the Microsoft Service Manager 2010 team blog
Microsoft Dynamics Customer model poster
Microsoft Opeations Framework

27 oktReference to ListTemplate ID’s MOSS

Lately I’m building different kind of features, which can be very easy and interesting, but more on that later on. When I tried to bind some of those features to different kind of lists I came across the subject of ListTemplate ID’s.

ListTemplate ID’s
Every ListTemplate is associated with a different kind of ID, a value which can be used within a feature. For instance, a announcements list template is associated with the value 104. This can be very useful if you want to bind your feature to just document libraries.

	
		
			DeletingEventHandler
			ItemDeleting
			10000
			DeletingEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5cce5f062aa189d
			DeletingEventHandler.DeletingAction
			
			
		
	

The example above shows how to use a event receiver in your elements.xml file of a feature. In this case my event handler feature registers receiver for the ItemDeleting event of a Announcements list template. It uses my custom code described in the DeletingAction class (.cs).

Reference ListTemplate ID’s.
It can be useful to know the different kind of ListTemplate ID’s when you create features. When googling I came across some reference posts on ListTemplate ID’s. I decided to put them together into one table and added two Listtemplate ID’s I discovered myself. I found 1300 Translation Management library & 1301 Languages & Translations. For all the others ID’s the credits go to MSDN library, Mike Smith & Alex from Phase 2.

[table=1]
If there are any errors in the table above or you have new ID’s please let me know.

17 sepHow to create & deploy a custom theme in MOSS?

About 3 years ago this was one of the first questions I got when I started my first internship. Back then I was working with Sharepoint Portal Server 2003 & WSS v2. Soon I discovered it wasn’t as easy as it looked, but I got the basic idea. Every modification was by hand, but has something changed since then?

Classic 2003 way to create a custom theme
Create a custom theme the ’2003 way’ was mainly copying, pasting & editing files on the sharepoint web server. Especially the editing of the theme stylesheet, which contains a enormous amount of elements & classes, was a hell of a job. Fortunately tools like Color cop & Internet Explorer developer toolbar made it a bit manageable. Also resources like Heather Solomon’s CSS reference guide were pretty useful.

The basic steps were:
1. Copy a existing theme on the MOSS web server
2. Renaming setup file (.inf)
3. Modifying the stylesheets, images
4. Adding the theme to the TEMPLATE\LAYOUTS\1033\SPTHEMES.XML file

If you are searching for howto’s I can recommend articles from: Sharepoint End User Content Team, Tigirry’s Sharepoint Blog & Dan Lewis

Creating a custom theme MOSS style
Since then a lot has changed in the world of Sharepoint. Cool things like solutions, timer jobs & features were introduced with the release of MOSS. But googling on “create custom theme moss” still gives the same result. Copying & editing theme files on the web server.

Has nothing really changed since then? No, some things have changed, thanks to the wonderfull MOSS community.

That is also the main reason of this post. Two days ago I came across a this post from Keith Dahlby from Solutionizing.net about his STSDev Theme solution generator. He wrote that he added this option to the codeplex project STSDEV. It automates all step 1,2 & 4 described in the 2003 way and adds it to a Visual Studio project. And instead of manually copying it to the web server it creates a solution!

Adding import technique to Theme solution project in VST
One of the drawbacks of this was that if you upgrade the theme solution you still had to re-apply it by hand to the sites that are already using it. In some scenario’s this can be a problem. At this point the @import technique described by Heather Solomon comes around the corner. Keith Dahlby was already talking about implementing this in his generator, so looking forward to it.

In the meantime I manually added the import technique to my Visual Studio project, this is how I did it.

1. Follow Keiths steps described in this post to develop a theme solution project with STSDEV found on Codeplex

2. Create a new folders in the ROOTFILES directory for your theme.css file, I use the LAYOUTS/1033/STYLES/ location, as described in Heather’s @import technique post.
How to create a custom theme in MOSS? #07

3. Copy your theme.css file from the THEMES folder in ROOTFILES into the newly created folder in step 2
How to create a custom theme in MOSS? #02

4. Edit the theme.css file in the THEMES folder by removing al styles and replacing it by the single line:
[sourcecode language=css]@import “/_layouts/1033/styles/ExpiscornovusTheme/theme.css”;[/sourcecode]
How to create a custom theme in MOSS? #03

5. That’s it, if you build the project you get a solution file (.wsp). Next time you upgrade your theme solution you don’t have to re-apply the theme to every individual site that uses it, just press (ctrl + ) F5!

Customizing
Although this solution makes the creation and deployment of custom themes a lot easier it is still a good idea to think about customizing. Customizing a theme is still basicly editing a extensive CSS file. If you want it to look completely different from the basic MOSS look be aware this could be a hell of a job with all those elements. If you want to read more about theme customization I can recommend one resource in general: Heather Solomon’s blog. She has a lot of great articles on customizing, so definitely visit that blog.

Update 07-10-2008
Removed step 5 because the ddf & manifest files are modified during the rebuild process.

26 julLove/hate affair

I have love/hate affairs with a lot of things. One of them is Microsoft Office Sharepoint Server. Another one is blogging. A while ago I did both. Time to give it another try.