Hashtable taskHash = new Hashtable();
taskHash["Status"] = "Approved";
taskHash["PercentComplete"] = "1";
SPWorkflowTask.AlterTask(this._taskItem, taskHash, true);
This works great most of the time, however, if the custom content type defines no fieldrefs, or more specifically, the content type XML does not have the
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="Microsoft.SharePoint"
To fix this cryptic error, make sure that the