Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Codeunit 9070 "Document Errors Mgt." - Procedure OnAfterGetCurrRecordPurchDocCheckFactbox - OnBeforeOnAfterGetCurrRecordPurchDocCheckFactbox #28180

Open
mavohra opened this issue Feb 19, 2025 · 0 comments

Comments

@mavohra
Copy link

mavohra commented Feb 19, 2025

Describe the request

Please add an event OnBeforeOnAfterGetCurrRecordPurchDocCheckFactbox in Codeunit 9070 "Document Errors Mgt." - Event Subscriber : OnAfterGetCurrRecordEvent in procedure OnAfterGetCurrRecordPurchDocCheckFactbox

[EventSubscriber(ObjectType::Page, Page::"Purch. Doc. Check Factbox", 'OnAfterGetCurrRecordEvent', '', false, false)]
    local procedure OnAfterGetCurrRecordPurchDocCheckFactbox(var Rec: Record "Purchase Header")
    var
        IsHandled: Boolean;
    begin
        OnBeforeOnAfterGetCurrRecordPurchDocCheckFactbox(Rec, IsHandled); // <------- New Event
        if IsHandled then
            exit;

        if BackgroundValidationEnabled() then begin
            SetFullDocumentCheck(true);
            case Rec."Document Type" of
                "Purchase Document Type"::Invoice:
                    GlobalPurchaseInvoicePage.RunBackgroundCheck();
                "Purchase Document Type"::Order:
                    GlobalPurchaseOrderPage.RunBackgroundCheck();
                "Purchase Document Type"::"Credit Memo":
                    GlobalPurchaseCreditMemoPage.RunBackgroundCheck();
                "Purchase Document Type"::"Return Order":
                    GlobalPurchaseReturnOrderPage.RunBackgroundCheck();
            end;
        end;
    end;
[IntegrationEvent(true, false)]
    local procedure OnBeforeOnAfterGetCurrRecordPurchDocCheckFactbox(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)
    begin
    end;

Additional context

We need to add custom support for background validation of documents and journals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant