http://support.microsoft.com/kb/954018

I ran into this issue again this week and since it had been so long since I had seen it, it took me a while to remember the solution- which I thought I’d share with you know.

Problem

You receive the following message when attempting to save a record:

Object reference not set to an instance of an object.

 

Cause

This problem occurs because a money attribute is created for the entity. When you do this, Microsoft Dynamics CRM 4.0 creates an exchangerate attribute to work together with the money attribute. The money attribute is published as part of the entity.

However, if you delete the money attribute, the exchangerate attribute is not removed. Therefore, when you try to run a Microsoft Dynamics CRM plug-in, the plug-in can find the exchangerate attribute. However, the plug-in cannot find the money attribute

 

Solution

Create a new money attribute on the entity.  This attribute will remain unused and does not need to be on the form.

 

Comments

Seeing this error is rare.  It occurred in my instance because another developer originally added a field as a money type then realized it wasn’t actually money, it was a float type.  He deleted and recreated the attribute which inadvertently create the problem.