Updating contact in an incident workspace via an add-in
Content
I have a workspace add-in which works without problem when used on a contact workspace. But when I use it on an incident workspace, I get an error:
The offending lines of code are:
cntct = (IContact)this._recordContext.GetWorkspaceRecord(WorkspaceRecordType.Contact);
cntct.AddrStreet = street;
cntct.AddrStreet = street;
I suspect that I have to do things differently when the main workspace is not a contact workspace, can somebody point me in the right direction please.
As requested:
The error message is: Object reference not set to an instance of an object
It is a new incident. It works on a contact workspace when it is a new contact.
1