to get a personalized navigation.
to get a personalized navigation.
I'm trying to create customers and suppliers by providing the associate payload in a variable, but when I try to use customerNo_suggest_interval or supplierNo_suggest_interval in the variable it doesn't work (i.e. customerNo/supplierNo is not set). It's working fine when I don't use a variable.
Example where it doesn't work:
mutation insert($cid : Int!, $customers : [Associate_Input!]!)
{
useCompany(no: $cid)
{
associate_create(
values: $customers
)
{
affectedRows
items
{
associateNo
privatePerson
customerNo
supplierNo
contactFor
name
shortName
languageNo
}
}
}
}
Variables:
{
"cid": 123,
"customers": [
{
"name": "var cust test 1",
"countryNo": 47,
"customerNo_suggest_interval": {
"from": 40000,
"to": 49999
}
}
]
}
Response:
{
"data": {
"useCompany": {
"associate_create": {
"affectedRows": 1,
"items": [
{
"associateNo": 1570,
"privatePerson": 0,
"customerNo": 0,
"supplierNo": 0,
"contactFor": 0,
"name": "var cust test 1",
"shortName": "var cust test 1",
"languageNo": 47
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "000000000000000038e3009a20ea3a9f"
}
}
Example where it works:
mutation insert($cid : Int!)
{
useCompany(no: $cid)
{
associate_create(
values:[
{
name: "without var cust test 1",
countryNo: 47,
customerNo_suggest_interval: {
from: 49000,
to: 49999
}
}
]
)
{
affectedRows
items
{
associateNo
privatePerson
customerNo
supplierNo
contactFor
name
shortName
languageNo
}
}
}
}
Variables:
{
"cid": 123
}
Response:
{
"data": {
"useCompany": {
"associate_create": {
"affectedRows": 1,
"items": [
{
"associateNo": 1569,
"privatePerson": 0,
"customerNo": 49014,
"supplierNo": 0,
"contactFor": 0,
"name": "without var cust test 1",
"shortName": "without var cust test 1",
"languageNo": 47
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000007466e72d2f296876"
}
}
I assume this is supposed to work?
Solved! Go to Solution.
The fix for this is now in production.
This is a bug. We will investigate and fix it.
Copyright © 2022 Visma.com. All rights reserved.