CRM 2011 – New White Paper – Microsoft Dynamics CRM Reference Architecture

I read a blog entry by  Sumit Virmani explaining there is a new White Paper released explaining the architecture of CRM 2011.

You can download the white paper here

http://download.microsoft.com/download/E/E/7/EE72BCF3-66E9-41E3-BEB2-8CC0A90A326A/Dynamics CRM Reference Architecture Version 1.0.pdf

it’s about 10 pages without title’s and contents pages.

 

CRM 2011 – Great article on Auditing Best Practices

There is an excellent article on auditing on best practices on auditing.

Auditing is one of best enhancements in CRM 2011 and one which lots of users were asking for.  If you used CRM 4 you might have used the good CRM 4 audit plugin which I blogged about here or you may have created your own version of auditing by creating a new entity on the update event.

So when auditing was included out of the box it was cheers all round.   When you use CRM 2011 and find yourself adding loads of entities you can forget whether to tick or untick auditing.

You can read the full article here, it’s a great article and I recommend reading it.  It makes some great points, this one I found particularly interesting. I never knew you could delete the audit logs.  The gist of the article is make sure you think about what to audit e.g. don’t bother with read only values, don’t bother with data you don’t need to track.  Trim down what you are auditing to the vital information.

 4. Delete Old Logs entries. Audit logs use disk space. The more activity the system has on audit enable entities, the more logs and thus the more disk space will be used. There is no need to keep audit logs indefinitely. CRM 2011 allows an administrator to delete auditing in batches.  Each batch is a calendar quarter.   Determine the time frame to keep audit logs and incorporate into a process deleting old entries.

Audit log managed is located in Settings / Auditing / Audit Log Management

Then select the batch to delete.

Currently the only option to delete is by calendar quarter.  However, via custom code or potential in future enhancements, deletion of audit log by entity or more granularly can be accomplished.

 

 

There are also some interesting FAQ at the bottom and auditing doesn’t slow down your CRM system, I’m guessing it must be done using the ASYNC service then.

It raises the question about storage and I was discussing this with someone today, does all the rows to the ASYNC table also count against your storage? reading the audit answer below I guess it would

3. Does audit data count against my CRM storage quota?

Yes it does.  That is why we recommend deleting audit data on a regular basis as part of a yearly maintenance.  Finding out how much disk space your audit data is taking is very simply.  Simply navigate to Settings / Auditing / Audit Log Management.

4. Can I audit just changes done by a couple users?

Auditing is turned on or off based on the entity or attribute.  If auditing is only desired for a couple users custom code is needed.

 

 

 

 

 

 

 

 

 

 

 

CRM 2011 – how to set up Remote debugging for plugins

A funny thing happened to me this week, I had created a plugin with another developer and when I deployed it, it refused to work.  When I tested the code on my computer it worked fine.  I tried to debug the plugin by throwing some errors but  in the end I couldn’t figure out what was going on.

The plugin was quite complex, it retrieved some data, then called a report on reporting services and then filed those reports into SharePoint.  The problem I had was it wasn’t working and I didn’t know at what stage it was having trouble.

so I decided to remote debug the plugin.  I have read about how to do it but have never actually needed to because most of the plugins I have deployed are fairly straight forward.

so I searched CRM 2011 remote debugging and amusing the page I found was one I had written!

Actually the first page is an excellent step by step guide a bit similar to this one, you can read that here

The second page was mine which has some good links to articles and videos which you can read here

I will talk you through some of the process.  Basically you first need to download the remote debugger wizard and install it on the server where you are going to debug.

download the remote debugger wizard, which you need to setup on the server, click the link below

Microsoft Visual Studio 2010 Remote Debugger

once you have installed it on the server, I chose not to set it up as a service which means when I want to remote debug I have to log onto the server and click the application, no problemo

This is a good page from Microsoft which list details about setting up the remote debugger.

What you need to do then is build your plugin and then copy the DLL and pdb file onto the server in the directory (or something similar)

C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly

You need the dll and pdb file because it’s the pdb file (symbol!) which actually helps you with the remote debugging.

You now need to open the plugin registration tool, select the DLL and choose to deploy the plugin to disk.  You cannot remote debug if you don’t deploy to disk.  I would also say I would recommend you only deploy plugins to disk when you want to remote debug them, other times always put them in the database.  If you want to read why go here which explains why.

Once you have deployed the workflow you then need to start the remote debugger.  If you are running on Windows 7 then make sure you start the remote debugger as an administrator

once that is up and running (and firewalls set if you need to).  You then go to your machine open visual studio, start up the plugin project.

Go to Debug/Attach to Process

you then need to put in the qualifier, which you can get by going to server, going to the Remote Debugging Monitor (which you need to start if you haven’t already) and then go to tools/options and this will give you something like

DOMAIN\ben.hosking@servername

you copy this and put it in the qualifer section on the attach to process.  Once you have done this it will then show all the processes you can attach to on the server, you want to choose the W3wp.exe.

now your CRM instance and do what ever you need to do to kick off the plugin and you should then magically drop into your code on your computer.  One word of warning you will need to put in a breakpoint.

Also if it doesn’t catch then basically restart the server, restart the debugging monitor and try it again.

I would also like to warn people that if you are debugging the plugin then you might cause the CRM instance to stop working whilst everyone waits for you to debug the plugin.  When I was stepping through some code it stopped everyone using the system!!!

Make sure you stop debugging when you leave work because it might cause people not to be able to use CRM for quite a long time.

Friday fun – Email Blunders, Spelling Bee’s and Monkey business

I thought I would release a bit of joy this friday.

I was looking at my twitter stats today and I have 248 followers, I’m not sure what to do with them but they are there following away.

I had an amusing email today from someone complaining CRM in Dev wasn’t working, it wasn’t returning anything and it was only then I realised I had the remote debugger still locked on to CRM, holding everyone up.

lets start with the boys from xkcd

Exploits of a Mom

http://www.theemailadmin.com/2011/06/email-blunders/

I’m sure everyone has sent an email to the wrong person

“The Element” by Sir Ken Robinson

http://mikeames.wordpress.com/2011/06/03/%E2%80%9Cthe-element%E2%80%9D-by-sir-ken-robinson/

This is an interesting blog entry.

Girl Aces ‘Cymotrichous’ to Win Spelling Bee

http://online.wsj.com/article/SB10001424052702303657404576362411603424334.html

I have to admit I struggled to even say the word

Gorilla On A Mission – Banana Split Milkshake