Unable to to create request because of theses errors : Field with id 'customfield_10009' named 'Coun

Hi I am creating customer request form using jsd experimental APIS.

I get the all form fields using RequestTypeFieldService. And used ServiceDeskCustomerRequestService while submitting the customer request.

I am facing problem while form contain select field. I am unable to set custom field value which is select field.

Map<FieldId, FieldInputValue> fieldValues = new HashMap<FieldId, FieldInputValue>();
fieldValues.put(FieldId.withId("customfield_10009"), FieldInputValue.withValue(FieldInputValue.withValue("10002")));
Optional<Set<String>> user = Optional.empty();
log.info("Customer username:---"+customer.getUsername());
CustomerRequestCreateParameters reqBuilder = customerRequestService.newCreateBuilder()
.serviceDesk(serviced)
.requestType(rqType)
.fieldValues(fieldValues)
.fieldValue(FieldId.withId("summary"), FieldInputValue.withValue("Hi i am created"))
.customerRequestChannelSource(CustomerRequestChannelSource.PORTAL)
.raiseOnBehalfOf(customer.getUsername())
.requestParticipants(user)
.build();

Either<AnError, CustomerRequest> createdRequest = customerRequestService.createCustomerRequest(admin, reqBuilder);

 It return me following error.

Unable to to create request because of theses errors : Field with id 'customfield_10009' named 'Country' has these errors : Could not find valid 'id' or 'value' in the Parent Option object.

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 in Jira Service Desk

Looking for teams who switched from email to Jira Service Desk

The Jira Service Desk marketing team is working on a guide to help new Atlassian customers switch from email to JSD and we'd love to hear from you! Please share: - What made you realize that i...

262 views 1 7
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you