to get a personalized navigation.
to get a personalized navigation.
Hi,
We're not able to fetch open entries from GraphQL due to the following issues:
[
{
"Locations": null,
"Message": "Error: Failed to execute operation.",
"Path": [
"useCompany",
"openCustomerEntry",
"items",
0,
"joinup_Order"
],
"Extensions": {
"data": {
"status": 5,
"status_name": "failedToExecuteOperation"
}
}
},
{
"Locations": null,
"Message": "Error: SQL command no. 3014 failed.",
"Path": [
"useCompany",
"openCustomerEntry",
"items",
0,
"joinup_Order"
],
"Extensions": {
"data": {
"status": 2,
"status_name": "databaseError"
}
}
}
]
The query:
Variables: {
"voucherDateAsDate": null,
"companyId": *,
"nextPageCursor": null
}
query GetUnpaidInvoices($companyId: Int, $nextPageCursor:String) {
useCompany(no: $companyId) {
openCustomerEntry(filter: { _and: [ { orderNo: { _not_eq: 0 } } ],}after:$nextPageCursor
) {
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
items {
amountInCurrency
debitAmountInCurrency
creditAmountInCurrency
invoiceAmountInCurrency
outstandingAmountInCurrency
debitOutstandingAmountInCurrency
creditOutstandingAmountInCurrency
cashAmountInCurrency
fixedAmountInCurrency
partPaymentInCurrency
outstandingCashAmountInCurrency
vatAmountInCurrency
voucherJournalNo
customerNo
voucherNo
voucherDateAsDate
valueDateAsDate
voucherType
text
dueDateAsDate
paidLastAsDate
orderNo
invoiceNo
reference
crossReference
turnover
paidStatus
generalLedgerAccountNo
changedByUser
paymentTerms
cashDueDateAsDate
employeeNo
additionalText
transactionStatus
deliveryAssociateNo
paymentMethod
externalReference1
externalReference2
paymentNo
cid
originalDueDate
originalDueDateAsDate
currencyCorrectionExchangeRate
currencyCorrectionAmount
currencyCorrectionDateAsDate
bankAccount
createdByUser
autopayPaymentReference
originalVoucherNo
changedDateTime
createdDateTime
amountDomestic
vatAmountDomestic
outstandingAmountDomestic
noReminders
joinup_Country {
isoCode
name
}
joinup_Currency {
currencyNo
isoCode
name
}
joinup_GeneralLedgerAccount {
accountNo
name
taxCode
}
joinup_Country {
isoCode
name
}
joinup_VoucherType {
voucherType
defaultText
}joinup_Order {
customerNo
invoiceCustomerNo
totalDiscountPercent
orderPreferences
name
addressLine1
addressLine2
addressLine3
addressLine4
postCode
postalArea
deliveryName
deliveryAddress1
deliveryAddress2
deliveryAddress3
deliveryAddress4
deliveryPostCode
deliveryPostalArea
deliveryTerms
deliveryMethod
paymentTerms
paymentMethod
factoringNo
sellerOrBuyer
roundingDomestic
roundingInCurrency
joinup_Associate_via_InvoiceCustomer {
title
companyNo
emailAddress
phone
privatePhone
mobilePhone
}
joinup_PaymentTerms {
creditDays
creditMonths
}
joinup_Country {
isoCode
name
}
joinup_Country_via_DeliveryCountry {
isoCode
name
}
}joinup_Associate_via_Customer {
externalId
invoiceCustomerNo
customerNo
factoringCompanyNo
name
title
companyNo
emailAddress
phone
privatePhone
mobilePhone
addressLine1
addressLine2
addressLine3
addressLine4
postCode
postalArea
visitPostCode
visitPostalArea
countryNo
deliveryMethodForCustomer
deliveryTermsForCustomer
paymentTermsForCustomer
paymentMethodForCustomer
currencyNo
generalLedgerAccountNoForCustomer
yourReference
customerPreferences1
joinup_Country {
isoCode
name
}
}
}
}
}
}
Do you know what is the root cause?
Solved! Go to Solution.
Yes, it helped. 🙂
Or you can try setting unoptimized: true, but the query might run into a timeout then. Finding the golden number for pagination is probably better.
@iizy Please provide a trace ID and we can have a look to find out what is going on.
Copyright © 2022 Visma.com. All rights reserved.