Skip to content

[Event Request] codeunit 5763 "Whse.-Post Shipment" - OnBeforeCheckWhseShptLines #29487

@auzhhv

Description

@auzhhv

Why do you need this change?

Can you add "Preview Posting" to event OnBeforeCheckWhseShptLines in codeunit 5763 "Whse.-Post Shipment".

        IsHandled := false;
        //OnBeforeCheckWhseShptLines(WhseShptLine, WhseShptHeader, WhsePostParameters."Post Invoice", WhsePostParameters."Suppress Commit", IsHandled);
        OnBeforeCheckWhseShptLines(WhseShptLine, WhseShptHeader, WhsePostParameters."Post Invoice", WhsePostParameters."Suppress Commit", IsHandled, WhsePostParameters."Preview Posting");
        if IsHandled then
            exit;
    [IntegrationEvent(false, false)]
    //local procedure OnBeforeCheckWhseShptLines(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; Invoice: Boolean; var SuppressCommit: Boolean; var IsHandled: Boolean)
    local procedure OnBeforeCheckWhseShptLines(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; Invoice: Boolean; var SuppressCommit: Boolean; var IsHandled: Boolean; PreviewPosting: Boolean)
    begin
    end;
    end;

Describe the request

I need to check whether Preview Posting is set to avoid running custom code that is not supposed to run during preview.
Internal work item: AB#615332

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions