OnPostPutAwayOrder_OnBeforeRunWhseActivityPost

Use this event to

Code to be executed prior to posting via standard posting routines.


Description

The event can be used to call functions on the standard posting codeunit before run. For Instance, activate printing document on posting or change filtering on lines before posting.


Commit

Database transactions in [...]OnBeforeRunWhseActivityPost is committed to database prior to calling standard "Whse.-Activity-Post" function. Your customized code must be structured accordingly.

You may subscribe to standard posting events to ensure rollback of your database transactions or trigger events on-after posting, if this is required for your code.


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Put Away", 'OnPostPutAwayOrder_OnBeforeRunWhseActivityPost''', true, true)]
    local procedure OnPostPutAwayOrder_OnBeforeRunWhseActivityPost(var _WhseActLinesToPost: Record "Warehouse Activity Line"; var _WhseActPost: Codeunit "Whse.-Activity-Post")
    begin
    end;


See also: 
How-to: Subscribing to standard events


Example: Print Document on Posting

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Put Away", 'OnPostPutAwayOrder_OnBeforeRunWhseActivityPost''', true, true)]
    local procedure MyOnPostPutAwayOrder_OnBeforeRunWhseActivityPost(var _WhseActLinesToPost: Record "Warehouse Activity Line"; var _WhseActPost: Codeunit "Whse.-Activity-Post")
    begin
        _WhseActPost.PrintDocument(true);
    end;


Examples

There are no items with the selected labels at this time.


Version History

Version

Changes

MOB5.13Introduced