What makes a good CRM blog

one of the things you do when you have a blog is look at your blog stats, every day you click on the stats page to see what the numbers are today/this week/this month.

I am constantly surprised by the amount of page views this CRM blog gets but the last view days it has blown my mind.   My previous highest page views in one day was 425 set on the 24th March and then suddenly yesterday I pass through the 500 page views in one day and then today I got 778 page views in one day.  It wasn’t until 3rd week in Feb that I was getting that many page views in a week.

The total page views for the blog also hit 16000 this week.

I was wondering if the sudden increase was maybe something to do with Convergence 2011 coming up soon but then looking at the articles it still seems to be Javascript, sharepoint, plugins that are popular

I was wondering why I have been getting so many page view and these are the reason

  • regularly blog posts – people like to regularly content and get in the habit of reading your blog
  • over blogging – to get this blog up and running I have been putting a lot of effort blogging
  • popular topics – Javascript, plugins, CRM 2011, sharepoint these topics are of great interest to people
  • breaking news – I kept up to date with CRM new releases and blogged about the latest topics
  • make it interesting – I tried to write about interesting topics
  • link to good articles – there are some fantastic blogs out there with excellent information
  • examples from my work – I try to blog about real examples I come across when programming in CRM
  • gotchas – blog how you overcome common problems to help other people experiencing the same problem.
  • reply to comments
  • put trackbacks to other articles – give other blogs the credit they deserve.

Thanks to all the people who have been reading my blog and commenting.  Also a big thanks to all the other CRM bloggers out there who have been writing excellent blog posts.

Pad a number with zeros

I’m writing an autocounter in CRM 2011 because for some reason they haven’t included one!! I asked someone who did a free one in CRM 4 if they were upgrading it to CRM 2011 and he said I could have it for $500.


I read this article



it gives you loads of ways to do it and it would be useful if I was using doubles but I am just using plain old ints.  Here is the nice simple method of padding a number with zeros.


private string padNumber(int counter, int padlength)


string result = “”;

string fmt;


fmt = new String(‘0’, padlength);

result = counter.ToString(fmt);

return result;




CRM 2011 – Form loading error – don’t panic, publish again

I had a terrible moment today when one of my forms wasn’t loading and was throwing an error every time I tried to open the form.

It didn’t matter if I was opening the form, editing the form, it just fell over straight away.  It seemed somehow I had corrupted my form.  Nightmare scenarios were running through my mind, would I have to create the whole form and variables from scratch, I could  probably export the changes and import them with a few changes to create a similar entity but it would probably have the same problem?

after the initial panic, I calmed down and thought what did I change last.

The last change I had mad was a minor one, adding a whole number field and adding it to the form.  This got my thinking that surely that wasn’t the cause.

I took the field off the form published it and then hey presto I could open the form again.  I then added the field back onto the form, published it and I could still open the form.

I’m guessing there had been some sort of problem which occurred last time I was publishing the customizations for this form.  I think for some reason the publishing of the form hadn’t finished or got it’s self in a bit of a mess ( I had never seen this error before).  I think by publishing it again it sorted its self out.

If this problem happens to you, don’t panic and do the following

  • try saving and publishing the customizations for the form again
  • make sure you don’t have multiple windows changing the same variables open
  • remove the last field you added or roll back the last change

Make sure you export your customizations on a frequent basis so if you do have to go back you have a fairly new version to work with

Here is the error, I managed to do it again.  The one thing I noticed was this error occurred when I was deleting a variable and adding a variable with the same name but a different type e.g. it was a whole number and next time is was a string.

Microsoft CRM Error Report:
Error Description:

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Error Details:

Exception of type 'System.Web.HttpUnhandledException' was thrown.

Full Stack:

[NullReferenceException: Object reference not set to an instance of an object.]
   at Microsoft.Crm.Application.Forms.CustomizableFormExtended.BuildFormModel(FormDescriptor formDescriptor)
   at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, FormDescriptor fd)
   at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName)
   at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Other Message:
Error Number:
Source File:

Not available

Line Number:

Not available

Convergence 2011 – Guide to convergence Articles

I have been getting quite envious of all the convergence 2011 talk recently, unfortunatly the company I work for aren’t sending me but we do have a couple of managers going over (hmmm I wonder who decided on who was going).

I have been impressed with presentation topics and I think it is worth the investment for companies to send some staff who work with CRM because you are going to learn loads of great stuff about CRM 2011 and get the chance to do some quality networking.  I don’t mean networking in the view people as targets and try pass out your business card to as many people as possible but in the CRM community the MVP’s are very helpful and contribute a lot of the CRM community, they are also independent from Microsoft (I think) so you can get some honest advice from them.

so it was with interest that over the last few weeks there have been lots of blog entries advising people how to get the most out of Convergence 2011.  Today I saw the first summary of convergence 2011 guides, this if nothing else shows how serious people are taking it.  You can read the blog entry here, I’m sure if I was going I would also be drawing up detailed plans.

If you want just the links to convergence 2011 tactics then they are here