Site icon Microsoft Business Applications

Post sales invoice through code



Those, who want to have more control over the data to be posted, should take a look at the parameters of salesFormLetter.update().

static void postSalesInvoice(Args _args)
{
SalesTable salesTable = SalesTable::find(“000747”);
SalesFormLetter salesFormLetter;

salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);
salesFormLetter.update(salesTable, systemDateGet(), SalesUpdate::All);
}

Exit mobile version