Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Gemini Web Service: Not saving custom field

api

For some reason gemini is not saving the custom field that I created to hold the email address of the user. In an attempt to resolve this issue I tried to use the "SaveCustomFieldData" method associated with CustomFieldService but was unsuccessful. Please help! The following is the code I am using. The commented sections are part of my savecustomfielddata attempt.

        //CustomFieldsService customService = new CustomFieldsService("https://website", "user", "password", "");
        CustomFieldDataEN[] customFields = new CustomFieldDataEN[1];
        customFields[0] = new CustomFieldDataEN();
        customFields[0].CustomFieldID = 22;
        customFields[0].CustomFieldData = email;
        //customFields[0].CustomFieldFormattedData = email;

        customFields[0].IssueID = issueID;
        customFields[0].ProjectID = projectID;
        customFields[0].UserID = resource.UserID;

        //customService.SaveCustomFieldData(customFields[0]);


        newIssue.IssueCustomFieldData = customFields;
Dan
· 1
Dan
Replies (4)
helpful
0
not helpful
  1. Always use the service manager class to "talk" to Gemini.
  2. What happens when you call save custom field data?

Mark Wing
· 9108
Mark Wing
helpful
0
not helpful
  1. CustomFieldDataEN[] cFiled = new CustomFieldDataEN[1]; cFiled[0] = new CustomFieldDataEN(); cFiled[0].CustomFieldID = 22; cFiled[0].CustomFieldData = gmIssue.ContactEmail;

newIssue.IssueCustomFieldData = cFiled;

//create issue newIssue = serviceManager.IssuesService.CreatePartialIssue(newIssue); //issue is created but the IssueCustomFieldData is empty array

//read the CustomFiels for the issue created CustomFieldDataEN[] cfData = serviceManager.IssuesService.GetCustomFieldData(newIssue.IssueID); //two custom fileds returned but CustomFielsData for the CustomFieldID=22 is not assigned cfData[1].CustomFieldData = gmIssue.ContactEmail;

newIssue = serviceManager.CustomFieldsService.SaveCustomFieldData(cfData[1]);

  1. Error on the SaveCustomFieldData: Message: '100' is an unexpected token. The expected token is '"' or '''. Line 20, position 65. Source: System.XML

Dan
· 1
Dan
helpful
0
not helpful
ANSWER

CreatePartialIssue will not save the custom field data, please use create issue (3.7+).

You are probably getting the error with saving the custom field due to the ASHX file handler not configured to accept all verbs for the Gemini site in IIS. Please check the configuration in IIS (which version are you running?)


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I need to use CreatePartialIssue because I need to keep defaut values for some fields.

I have tried to use CreateIssue and I got an error and the issue was not cerated.

IIS 6.0. IIS has been configured to accept all verbs and we are still having the same error ('100' is an unexpected token. The expected token is '\"' or '''. Line 20, position 65.) on serviceManager.CustomFieldsService.SaveCustomFieldData(cfData[1])


Dan
· 1
Dan