Hello,
I am trying to create a service desk request from the API but i get the error and I can't find whats wrong. I tried much formats but nothing seems to work.
Error :
"Impossible to create a request due to these errors: The field with id "customfield_10808" named "Maintenance type" contains these errors: Specify a valid 'id' or 'name' element for Maintenance type, \nThe field with id "priority" named "Priority" contains these errors: Specify the Priority (id or name) in string format
The Json I send :
{
"requestFieldValues": {
"summary": "test",
"customfield_10808": "{\"name\":\"Minor repair\"}",
"customfield_10809": "{\"name\":\"Bureau stagiaires\"}",
"description": "test",
"priority": "{\"name\":\"Bloqueur\"}"
},
"requestTypeId": "248",
"serviceDeskId": "22"
}
I also tried with the id but same result.
Endpoint is /rest/servicedeskapi/request.
Thanks
HI @Thomas Goossens ,
I'm wondering about the custom fields. What type of fields are they?
(I'm guessing priority is the default system priority field :))
The values you are sending are they translated values (since they are in French) or ar they the only value on the field?
I would suggest to either send the id of the select value (I'm guessing they are select values) or the priority id, other than that try with the default system language (again guessing English)
HI,
These a select fields and the values I send are values that i get directly from API ( "validValues").
I didn't find more informations about these values like where to find the Id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Normally the id should be listed there as the "value".
Can you try sending it with the "value" as the id?
You might be getting the translated values as you are most likely authenticating iwth your own account which the profile has as French?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried with the values as id like you suggested but i get same error, select fields are not recognized.
{
"requestFieldValues": {
"summary": "test",
"customfield_10808": "{\"id\":\"10376\"}",
"customfield_10809": "{\"id\":\"222\"}",
"description": "test",
"priority": "{\"id\":\"1\"}"
},
"requestTypeId": "248",
"serviceDeskId": "22"
}
Yes i am logged in with a french account, but if i try to open request in web native interface, everything is in english except the values "label", they are saved in french in database. However both value and label are not recognized for Maintenance type witch is not translated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dirk Ronsmans I finally found that with the value and this syntax it works. Thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.