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 OnAfterGetCurrRecordSalesDocCheckFactbox - OnBeforeOnAfterGetCurrRecordSalesDocCheckFactbox #28179

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 OnBeforeOnAfterGetCurrRecordSalesDocCheckFactbox in Codeunit 9070 "Document Errors Mgt." - Event Subscriber : OnAfterGetCurrRecordEvent in Procedure OnAfterGetCurrRecordSalesDocCheckFactbox

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

        if BackgroundValidationEnabled() then begin
            SetFullDocumentCheck(true);
            case Rec."Document Type" of
                "Sales Document Type"::Invoice:
                    GlobalSalesInvoicePage.RunBackgroundCheck();
                "Sales Document Type"::Order:
                    GlobalSalesOrderPage.RunBackgroundCheck();
                "Sales Document Type"::"Credit Memo":
                    GlobalSalesCreditMemoPage.RunBackgroundCheck();
                "Sales Document Type"::"Return Order":
                    GlobalSalesReturnOrderPage.RunBackgroundCheck();
            end;
        end;
    end;
    [IntegrationEvent(true, false)]
    local procedure OnBeforeOnAfterGetCurrRecordSalesDocCheckFactbox(var SalesHeader: Record "Sales 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