I have this code, which won't post the Packing slip. This code worked before, but now it does not create a new packing slip and does not post it.
I think there is something with Purchase Order field values, but can't find what it is. Order is Confirmed. I can create new packing slip manually through user interface.
Where can I find the actual logic for posting process in code?
PurchTable _purchTable = PurchTable::find("HS00000069");
PackingSlipId packingSlipId = "HS00000069-01";
PurchFormLetter_PackingSlip purchFormLetter_PackingSlip = PurchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter_PackingSlip.showQueryForm(false);
purchFormLetter_PackingSlip.purchTable(_purchTable);
purchFormLetter_PackingSlip.transDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()));
purchFormLetter_PackingSlip.specQty(PurchUpdate::ReceiveNow);
purchFormLetter_PackingSlip.printFormLetter(NoYes::No);
purchFormLetter_PackingSlip.parmParmTableNum(packingSlipId);
purchFormLetter_PackingSlip.chooseLines(true);
purchFormLetter_PackingSlip.runOperation();