Hi,
I'm getting the exception: Object reference not set to an instance of an object, when trying to update an incident if I set a DateTime field (not required) through plugin code.
If I comment line below for the CloseDate, it works fine.
I can set it to null in SQL, but when trying to update the record through Excel, it throws same error as updating in the plugin code.
Not sure which could be the issue, it's very weird.
Again, field is not mandatory in CRM.
var entity = new Entity { LogicalName = Incident.EntityLogicalName, Id = case.Id, Attributes = new AttributeCollection() }; entity.Attributes.Add("new_closedate", null);