to get a personalized navigation.
to get a personalized navigation.
Followin mutation:
{mutation {
useCompany(no: 4655191) {
orderLine_create(values: [{
orderNo: 1736
lineNo: 1
productNo: "TEQ1001"
processingMethod2: 81920
processingMethod1: 0
processingMethod4: 262144
quantity: 1
priceInCurrency: 9999
},
{
orderNo: 1736
lineNo: 2
productNo: "TEQ1"
structureLevel: 1
processingMethod2: 16385
description: "Eldøyane Camp Aker, Eldøyane, Stord, Norge-"Busshålo", Stord, Norge"
processingMethod1: 4096
quantity: 1
orgUnit1: 3131
transactionInformation1: "TB-032193-S01-N002"
transactionInformation2: "STD"
structureHeadLineNo: 1
priceInCurrency: 9999
},
{
orderNo: 1736
lineNo: 3
productNo: "TEQTurInf"
processingMethod2: 422330368
memoNo: 1538
}])
{
affectedRows,
items {
orderNo
lineNo
description
changedByUser
changedDateTime
}
}
}
}}
Results in:
{"Error parsing query: Unexpected character \"å\""}
What is the right way to send "å"?
Solved! Go to Solution.
It works for me:
mutation new_order_with_quotes($cid : Int, $ono : Int = 0)
{
useCompany(no: $cid)
{
order_create(values :[{
orderDate : null
}])
{
affectedRows
items
{
orderNo @export(as : "ono")
}
}
orderLine_create(values : [
{
orderNo : $ono
productNo : "101"
description : "sample with \"quotes\""
}
])
{
affectedRows
items
{
orderNo
lineNo
description
}
}
}
}
The response:
{
"data": {
"useCompany": {
"order_create": {
"affectedRows": 1,
"items": [
{
"orderNo": 1058
}
]
},
"orderLine_create": {
"affectedRows": 1,
"items": [
{
"orderNo": 1058,
"lineNo": 1,
"description": "sample with \"quotes\""
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "000000000000000032440f34c79a852b"
}
}
Result in front-end:
Sorry, I did see this first now that we have some " in the text. The question is more how to escape these " in correct way...
Send the whole object as a variable. The only way.
mutation CreateOrderLines($input: [OrderLine_Input]!) {
useCompany(no: 4655191) {
orderLine_create(values: $input) {
affectedRows
items {
orderNo
lineNo
description
changedByUser
changedDateTime
}
}
}
}
{
"input": [
{
"orderNo": 1736,
"lineNo": 1,
"productNo": "TEQ1001",
"processingMethod2": 81920,
"processingMethod1": 0,
"processingMethod4": 262144,
"quantity": 1,
"priceInCurrency": 9999
},
{
"orderNo": 1736,
"lineNo": 2,
"productNo": "TEQ1",
"structureLevel": 1,
"processingMethod2": 16385,
"description": "Eldøyane Camp Aker, Eldøyane, Stord, Norge-\"Busshålo\", Stord, Norge",
"processingMethod1": 4096,
"quantity": 1,
"orgUnit1": 3131,
"transactionInformation1": "TB-032193-S01-N002",
"transactionInformation2": "STD",
"structureHeadLineNo": 1,
"priceInCurrency": 9999
},
{
"orderNo": 1736,
"lineNo": 3,
"productNo": "TEQTurInf",
"processingMethod2": 422330368,
"memoNo": 1538
}
]
}
Copyright © 2022 Visma.com. All rights reserved.