Skip to content

[Event Request] Codeunit 415 "Release Purchase Document" procedure PerformManualReopen #30262

@cc-chku

Description

@cc-chku

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions