Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

...

Note
titleCommit

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 Pick", 'OnPostPickOrder_OnBeforeRunWhseActivityPostOnBeforeRunWhseActivityRegister''', true, true)]
    procedure OnPostPickOrder_OnBeforeRunWhseActivityPostOnBeforeRunWhseActivityRegister(var _WhseActLinesToPost: Record "Warehouse Activity Line"; var _WhseActPostWhseActRegisterCodeunit "Whse.-Activity-PostRegister")
    begin
    end;


See also: 
How-to: Subscribing to standard events

Example

        // [Example]: Print Document on Posting Set Qty. to Handle on lines that should be handled automatically before posting.
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Pick", 'OnPostPickOrder_OnBeforeRunWhseActivityPostOnBeforeRunWhseActivityRegister''', true, true)]
    procedure MyOnPostPickOrder_OnBeforeRunWhseActivityPostOnBeforeRunWhseActivityRegister(var _WhseActLinesToPost: Record "Warehouse Activity Line"; var _WhseActPostWhseActRegisterCodeunit "Whse.-Activity-PostRegister")
    begin
        _WhseActLinesToPost.SetRange("Bin Code", 'STORAGE ROBOT');
        _WhseActPost.PrintDocument(true)if _WhseActLinesToPost.FindSet(true, falsethen
            repeat
                _WhseActLinesToPost.Validate("Qty. to Handle", _WhseActLinesToPost."Qty. Outstanding");
                _WhseActLinesToPost.Modify(true);
            until _WhseActLinesToPost.Next() 0;
    end;

Version History

Version

Changes

MOB5.13Introduced

...