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 = “”;
fmt = new String(‘0’, padlength);
result = counter.ToString(fmt);