Post

1 follower Follow
0
Avatar

Another Link Error

The method below is giving me an error as follows:

Save operation failed Reason: 'Issue' and 'Customer' cannot have a 'Project Customer Link' link between them.

I'm not understanding why Clarizen thinks the issue is a project? I'm using code that's pretty much identical to that in the Sample API project...

Any ideas?

 

public void LinkCustomerToIssue(Issue Issue, Customer Customer)

{

GenericEntity parentIssue = new GenericEntity();

parentIssue.Id = new EntityId() { TypeName = "Issue", Value = Issue.WorkflowId };

GenericEntity link = new GenericEntity();

link.Id = new EntityId() { TypeName = "CustomerLink" };

FieldValue issueField = new FieldValue() { FieldName = "Entity", Value = parentIssue.Id };

FieldValue customerField = new FieldValue() { FieldName = "Customer", Value = new EntityId() { TypeName = "Customer", Value = Customer.WorkflowId } };

link.Values = new FieldValue[] { issueField, customerField };

CreateMessage createCustomerLinkMessage = new CreateMessage() { Entity = link };

Result[] result = this._clarizen.Execute(new BaseMessage[] { createCustomerLinkMessage });

ErrorMessage = result[0].Error.Message;

}

Dave Benjamin Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Ok, I've managed to resolve this one. I should have been using a CaseCustomerLink instead of CustomerLink Entity

Dave Benjamin 0 votes
Comment actions Permalink