I am having a difficult time trying to figure out how to create a support issue. There are no examples in the pdf file and the example code doesn't include any. Basically, I am clueless as to where to start. Here is my code and the error it throws. I have no idea which key it is talking about. I must say, it is slow going trying to figure out how to use this web api with the examples being as scarce as they are.
SupportCase supportCase = new SupportCase();
supportCase.externalId = id;
supportCase.email = recipient;
supportCase.title = subject;
supportCase.incomingMessage = message;
RecordRef assignee = new RecordRef();
assignee.type = RecordType.employee;
assignee.typeSpecified = true;
assignee.internalId = "1";
supportCase.assigned = assignee;
RecordRef company = new RecordRef();
company.type = RecordType.customer;
company.typeSpecified = true;
company.internalId = "7";
supportCase.company = company;
RecordRef contact = new RecordRef();
contact.type = RecordType.contact;
contact.typeSpecified = true;
contact.internalId = "1";
supportCase.contact = contact;
RecordRef status = new RecordRef();
status.type = RecordType.supportCaseStatus;
status.typeSpecified = true;
status.internalId = "2";
supportCase.status = status;
RecordRef category = new RecordRef();
category.type = RecordType.supportCaseType;
category.typeSpecified=true;
category.internalId = "2";
supportCase.category = category;
WriteResponse response = _service.update(supportCase);
if ( response.status.isSuccess )
{
Console.WriteLine("Created Support Issue {0} - {1}", subject, supportCase.internalId);
}
else
{
Console.WriteLine("Failed Support Issue {0} - {1}", subject, getStatusDetails(response.status));
}
Failed Support Issue Correction Request - Incorrect Score - [Code=INVALID_KEY_OR_REF] The specified key is invalid.