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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

1,236 views 2 14
Read article

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