Custom fields
I am having difficulty trying to add custom field data at the same time as creating an issue. I have seen the other couple of threads on this, and tried to use the same suggestions & code but to no avail
Attempt 1:
Trying to add the custom field data to the IssueEN data array for creation as part of data.IssueID = msmProxyManager.IssuesService.CreateIssue(data).IssueID;
// Custom field info
CustomFieldDataEN[] Cfield1 = new CustomFieldDataEN[2];
Cfield1[0] = new CustomFieldDataEN();
Cfield1[0].CustomFieldID = 2; // Make sure this is a vaild custom field id.
Cfield1[0].CustomFieldData = vHeatCallID;
data.IssueCustomFieldData = Cfield1;
Attempt 2:
Trying to add the custom field data separately from the issue creation. This attempt returns the following error "Exception has been thrown by the target of an invocation"
// Custom field info
CustomFieldDataEN Cfield0 = new CustomFieldDataEN();
Cfield0 = new CustomFieldDataEN();
Cfield0.CustomFieldID = 2; // Make sure this is a vaild custom field id.
Cfield0.CustomFieldData = vHeatCallID;
Cfield0.IssueID = data.IssueID;
CustomFieldDataEN cData = new CustomFieldDataEN();
msmProxyManager.CustomFieldsService.SaveCustomFieldData(Cfield0);
Any help appreciated. The extension ashx has all verbs checked and am not using windows authentication.
martin
· 1 |
|
Friday, December 4, 2009, 1:41:37 PM |