Hello,
I am trying to run a salesFormLetter_invoice.update using an Async call and I get the following error message.
“Cannot run form on non interactive session”
My code looks like this:
static public void PrintProformaInvoice(container _CallingParameters)
{
salesFormLetter_invoice salesFormLetter_invoice;
SalesTable sTable;
sTable = SalesTable::find(conPeek(_CallingParameters, 1));
salesFormLetter_Invoice = salesFormLetter::construct(DocumentStatus::Invoice);
salesFormLetter_Invoice.update(sTable,
DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()),
SalesUpdate::PickingList,
AccountOrder::None,
true, // Proforma
True, // Print form letter
true); // Use print management
}
public static void ProcessAdditionalReports(SalesId _SalesId)
{
Global::runAsync(classNum(asyncTest), staticMethodStr(asyncTest, printProformaInvoice), [_SalesId]);
}
I have also tried it from a button on a form and using element.RunAsync, but it fails as well. Is there issues with running the sales invoice formletter this way?
Shawn T.
