Hey everyone,
I am trying to settle customer and vendor transactions (payments/invoices) via a batch job. From what I have noticed the batch job seems to be working fine during vendor transactions settlement, but during customer transactions settlement this error shows up randomly "BOX API can't be used from non-interactive sessions".
The confusing thing is this was working fine before (for both customer and vendor transactions) but now seems to be working only for vendor and not for customer transactions. Does anyone have any information regarding this particular error or what might be causing this during settlement via batch jobs?
EDIT 1:
From what I can see from the trace, the error seems to be popping up in CustOpenVendTransManager::updateTransMarked().
I am further trying to pinpoint from where the error is thrown and will update the post accordingly.
EDIT 2:
The method is calling a box message in code line mentioned below. The error is most probably popping up due to the Box::yesNo() method. I will be further debugging the whole process to ensure that's the case and will fix it accordingly.
Thank you sohaibcheema and Sukrut Parab for answering and pointing me in the right direction.
if (skipPrePaymentSettlementWarning || !custVendTrans.Prepayment || Box::yesNo("@SYS68879", DialogButton::No) == DialogButton::Yes)]