Why do you need this change?
I would like to be able to intervene when resetting the status of a purchase document if its status is “Pending Approval.”
Similar to the option on the sales side.
Describe the request
Please implement this in the same way as on the "Release Sales Document" Codeunit in procedure "PerformManualReopen".
New Function "CheckReopenStatus(PurchaseHeader)" at the beginning of the procedure "PerformManualReopen"
local procedure CheckReopenStatus(SalesHeader: Record "Purchase Header")
var
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeCheckReopenStatus(PurchaseHeader, IsHandled);
if IsHandled then
exit;
if PurchaseHeader.Status = PurchaseHeader.Status::"Pending Approval" then
Error(Text003);
end;
Why do you need this change?
I would like to be able to intervene when resetting the status of a purchase document if its status is “Pending Approval.”
Similar to the option on the sales side.
Describe the request
Please implement this in the same way as on the "Release Sales Document" Codeunit in procedure "PerformManualReopen".
New Function "CheckReopenStatus(PurchaseHeader)" at the beginning of the procedure "PerformManualReopen"