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

Suresh Sakhare
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2017

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
TAGS
AUG Leaders

Atlassian Community Events