AA Rates

Submitted by Robert MacLean on Sat, 03/01/2008 - 21:05
NOTE: This was developed in March 2008 and the calculations are no longer accurate. They are close but not exactly right.
Update 11 August 2011: Want this as an app for your smartphone? Click here

A personal annoyance at the moment is the use of the term AA rates. It seems companies love to tell employees they pay at AA rates or charge customers at AA Rates. However due to a recent annoying experence I decided to read up on this, and to findout what the AA rate actually is.

Well imagine my surprise when I didn't find one magic overall AA rate! What I did find is there is a AA rate per vehicle, so how you get one rate is beyond me (I guess you could take the avg value of everyone in the company, but that sounds like too much work for admin/financial staff who need to update it each time someone joins/leaves).

Anyway I decided to take that and some of the Excel skills I have been taught recently and build a nice Excel speadsheet (2007 version) which works it out for you (download below). You can get the details on the rules and the fuel price (which you will need) from the AA site.

Tech•Ed 2006 Presentation and Samples

Submitted by Robert MacLean on Fri, 02/29/2008 - 16:22

(This is a repost of the content which was previously available on the IW community site)

At Tech·Ed Africa 2006, myself and Bruce Nicholson did a presentation on integration with Microsoft Dynamics CRM 3.0. While the slides were available for print, and on the event DVD, the code samples were not. No idea why since they were all submitted at the same time but that's life. So now for the first time here are the slides and all the code samples available for download!!

Duplicate Assigns On Create

Submitted by Robert MacLean on Fri, 02/29/2008 - 16:08
(This is a repost of the content which was previously available on the IW community site)

Here is an interesting effect which I was solved recently, namely when an item in MSCRM was created the assign event (both callout and workflow) would fire twice. This was very odd and great lengths were taken to track it down, using the MSCRM trace tool, various tests etc… But since this was one instance of the problem which could not be replicated at other sites it was eventually shelved until more important issues were resolved.

This issue only occurred during creations from outside sources (namely my code) and didn't happen if you created the item in the MSCRM interface. But this was normal code where I created the item, set the properties and passed it to the Create method. Nothing fancy here. The issue was that I couldn't see the trees because of the forest, namely I was setting the ownerid parameter as one of the parameters.

What this was doing internally was causing the assign to fire when the item was created and then to cause a second assign to fire to handle the ownerid. Removing that one line of code fixed the issue up immediately.

IW is dead, long live IW

Submitted by Robert MacLean on Fri, 02/29/2008 - 15:59
Well the Information Worker site got it's much anticipated face lift recently. It really looks amazing now and is more a proper community site than a blog site for a select few. Well done to everyone involved.

It does mean that my old content is gone, but do not fear I am making plans to get it back (either a backup or the WayBackMachine), so there will be some reposting on this site for the next little bit.

The text entered exceeds the maximum length

Submitted by Robert MacLean on Wed, 02/06/2008 - 13:19
In MSCRM 4.0 you may get the following error when trying to track an email:
The text entered exceeds the maximum length
This is caused because the message ID is too long for the field, has nothing to do with the email itself (message is confusing cause it says text entered, but you not actually entering it). To solve it do the following:
  • Open the IE CRM Client.
  • Open Settings
  • Select Customisation from the left menu and open the E-Mail  entity.
  • Open Attributes and Open the messageid attribute
  • You should see a text box named Maximum Length with the value 100 in it. Increase this value to 200.
  • Click Save and Close
  • Click Save and Close
  • Click More Actions à Publish All Customisations
  • Click Start Menu à Run and type iisreset click Run
Thanks to Oli Ward on the PSS at Microsoft for figuring this one out.

Almost Famous pt 2

Submitted by Robert MacLean on Mon, 02/04/2008 - 12:11
Out of the same interview as before, comes another article. I like this one more, as it feels less sales like (for those who know me, know I am not a sales person) and more like the actual interview was.

Almost Famous

Submitted by Robert MacLean on Mon, 02/04/2008 - 12:03
Ages ago I did an interview around the Rezonance product brand I work on. It was so long back I had forgotten about it. Well the interview appeared online this weekend. Thanks to Carey for the heads up.

South African ID Number Checker

Submitted by Robert MacLean on Thu, 01/31/2008 - 11:26
Update 26 August 2010: A new and better version of this Excel file has been made available. Please go to South African ID Number Checker in Excel version 2 to get it.
Update 11 August 2011: Want this as an app for your smartphone? Click here
A few days back I wanted to validate a list of ID numbers, and previously I have done the basics (length, date etc...) but I decided to do the full thing this time. So I search for the rules and found this post, which explains it nicely and contains some C# code. However for me C# didn't cut it as I wanted to process an Excel spreadsheet. So I whipped together a nice one which does the following checks:
  • Length
  • Valid Date
  • Date is in the past
  • Gender Flag
  • Nationality Flag
  • Check Bit
I've hidden the calculation cells so you can just unhide if you want to see the calculations. When I ran my list through it the failures came in two forms, obvious failures (things like 1000000000000) or check bit failures. Since I don't know which are real/valid in my list I am not sure if the check bit is 100%, but it did work fine for real ones I put in myself.
Anyway you can grab it below in the attachments section (You can grab the version 2 from the link above).

24 Jan 2010: I have disabled comments on this post as I am getting a lot of people asking me about who ID numbers belong to, how to track people based on ID's or what someones ID is. None of those I can answer as I do not work for the govt, police etc... If you have questions on the technical aspects of ID numbers please contact me using the contact form option.

Internet Facing Deployment Tool

Submitted by Robert MacLean on Sat, 01/26/2008 - 13:56

UPDATE 11 Feb 2008: The offical tool is now out. See http://www.sadev.co.za/node/167. The download for the beta one has been removed.

If you go through the documentation for MSCRM 4.0 there is a tool which can do the configuration of for you. However this tool does not exist yet and to get it you need to speak to Microsoft Product Support Services as it is still beta. However from looking at the news groups it seems thats hit and miss (guessing that some of the support guys know about it and some don't as it is beta). So until it is available I am putting it up here.

NOTE: This is a BETA tool and neither Microsoft nor myself will give you any help on this. This tool could completely damage your system so if you don't trust it, then do the steps described in the documentation.

Workflow doesn't work, Imports never happen, emails don't flow and Outlook clients cannot connect

Submitted by Robert MacLean on Wed, 01/23/2008 - 14:18
Update 23 June 2008: See The official way to change MSCRM ports for an official way to do this. Update 12 March 2008: After you get MSCRM 4.0 up and running (install or upgrade) on your system with a custom host header you may find that workflow doesn't work (or flow), imports sit in a submitted state forever, the email router and outlook client cannot connect to the MSCRM server. This could also happen if you change the website details in IIS. What is happening is even though you access your server on a specific URL, internally in the Async service (which handles the workflow, duplicate detectionand imports) and the email router and outlook client actually just use the URL you used to connect to the Discovery Service.

The discovery service is a web service which gives back the real URL to the web services in MSCRM, so if you changed IIS it still gives back the old ones. There is also a bug in the RTM of MSCRM 4.0 which causes it to use the machine name instead of the host header after upgrades. So you go to http://<nice name> and the discovery service gives back to http://<machine name>/mscrmservices/2007/crmservice.asmx which doesn't exist since yourhost headers should have it as http://<nice name>/mscrmservices/2007/crmservice.asmx

You can pick this up using fiddler on the email server or desktop machine when trying to configure the email router or outlook client respectively. So I went though this with Microsoft PSS and they came back with a SQL command you can run to fix this.

NOTE: As this is a DB change it is unsupported. If you are a little worried about the impact do backups then try it. If you are very worried contact PSS directly for help.
USE MSCRM_CONFIG
Update DeploymentProperties SET NVarCharColumn = '<server>:<port>' WHERE ColumnName= 'AsyncSdkRootDomain'
Update DeploymentProperties SET NvarCharColumn = '<server>:<port>' WHERE ColumnName = 'ADSdkRootDomain' 
Update DeploymentProperties SET NvarCharColumn = '<server>:<port>' WHERE ColumnName = 'ADWebApplicationRootDomain' 

Example, if your server is called: myserver and runs on port 50000
USE MSCRM_CONFIG
Update DeploymentProperties SET NVarCharColumn = 'myserver:50000' WHERE ColumnName= 'AsyncSdkRootDomain'
Update DeploymentProperties SET NvarCharColumn = 'myserver:50000' WHERE ColumnName = 'ADSdkRootDomain' 
Update DeploymentProperties SET NvarCharColumn = 'myserver:50000' WHERE ColumnName = 'ADWebApplicationRootDomain' 

Once done do an IISReset and restart the Async service and everything should start to work fine! As I said before this came from PSS (in particular Justin Thorp)and I would really like to thank him for the hard workand great responses I got on it.