Use this event to
Excerpt |
---|
Code to be executed prior to posting via standard posting routines. |
...
Note | ||
---|---|---|
| ||
Database transactions in [...]OnBeforeRunWhsePostShipment is committed to database prior to calling standard "Whse.-Post Shipment" 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::Codeunit, Codeunit::"MOB WMS Ship", 'OnPostShipOrder_OnBeforeRunWhsePostShipment', '', true, true)]
local procedure OnPostShipOrder_OnBeforeRunWhsePostShipment(var _WhseShipmentLinesToPost: Record "Warehouse Shipment Line"; var _WhsePostShipment: Codeunit "Whse.-Post Shipment")
begin
end;
See also:
How-to: Subscribing to standard events
Example
// [Example]: Print Document on Posting
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Ship", 'OnPostShipOrder_OnBeforeRunWhsePostShipment', '', true, true)]
local procedure MyOnPostShipOrder_OnBeforeRunWhsePostShipment(var _WhseShipmentLinesToPost: Record "Warehouse Shipment Line"; var _WhsePostShipment: Codeunit "Whse.-Post Shipment")
begin
_WhsePostShipment.SetPrint(true);
end;
Version History
Version | Changes |
---|---|
MOB5.14 | Introduced |
...