3
Vote

Object reference not set to an instance of an object

description

Hi, there.
 
I'm using this plugin (btw, good job!) to track changes on the contact entity.
 
We got a bug reported from one of our users:
Error: "Object reference not set to an instance of an object".
When: Editing of either "birthday" or "anniversary" attributes.
 
I found out that when the user changes values of datetime fields then the internal-use attribute "timezoneruleversionnumber" is changed as well (the CRM version is in Danish), where "AttributeMetadata.DisplayName.UserLocLabel" is null and throws an error when referenced in the "Execute" method:
auditDetail.Properties["custom_display_name"] = metaAttribute.LogicalName;
 
If this is the case, I just use the logical name instead.

comments

gisladottir wrote Feb 17, 2010 at 12:53 PM

OK.. I can now see that another one has reported this error recently as well ;)

wrote Jul 6, 2010 at 10:18 AM

wrote Feb 11, 2011 at 9:38 AM

dave0109 wrote Nov 29, 2011 at 8:48 AM

Hi, is there a "laymans" description of this solution?

wrote Feb 14, 2013 at 1:59 AM