
Hello Experts,
below the code to validate the receipt of purchase orders, if the data is correct, the reception goes well otherwise it goes to the draft status, how to add code to check and display the errors before validating at the reception ?
i try the code below but it's not work
public void generateReceiptPO()
{
PurchFormLetter purchFormLetter;
purchFormLetter = purchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.checkFormLetterId();
purchFormLetter.checkBeforePost();
purchFormLetter.getLast();
purchFormLetter.showQueryForm(false);
purchFormLetter.update(
purchTable,
strFmt("%1", invoiceOrderTable.InvoiceOrderId),
DateTimeUtil::date(DateTimeUtil::utcNow()),
PurchUpdate::All,
AccountOrder::None,
false,
false);
}
Many thanks
*This post is locked for comments
I have the same question (0)Hi sir,
Where are you calling this method? You can make a breakpoint in this code and see if you can enter this method.