I got a request to disallow posting packing slip and invoice if the concerned PO/ SO not yet post confirmation.
I tried to insert the following code in PurchTableForm.enableUpdateJournalButtons() class method
iF (!_purchTable.DocumentState == VersioningDocumentState::Confirmed && _purchTable.PurchStatus != PurchStatus::Received && _purchTable.InterCompanyOrder == noyes::No)
{
_buttonUpdateReceiptsList.enabled(false);
_buttonUpdatePackingSlip.enabled(false);
_buttonUpdateInvoice.enabled(false);
}
However, the above code does not take effect...
I would like to know what is the problem of my solution, and what should be the correct solution to accomplish this goal?