Use this event to
Change sort order for the receive order lines list at the mobile device.
Description
You may use this event only to change sort order.
You cannot set any values from this event.
Receive Order lines can be from:
- Warehouse Receipts
- Purchase Orders
- Transfer Orders
- Sales Return Orders
Sorting by existing fields
Change sorting key
- Use
.SetCurrentKey(field)
-function with any of the existing fields from the Line table (Record parameter on this event).
- Use
Change sorting direction
- Use
.Ascending(true/false)
-function.
- Use
Sorting by custom fields
Change sorting key
- Not possible from this event → Use instead OnGetReceiveOrderLines_OnAfterSetFrom[...] and the
Set_Sorting1()-
function.
- Not possible from this event → Use instead OnGetReceiveOrderLines_OnAfterSetFrom[...] and the
Change sorting direction
- This is done in two steps:
- Use instead OnGetReceiveOrderLines_OnAfterSetFrom[...] and the Set_Sorting1()-function.
- Then use
.Ascending()
-function in this event
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrderLines_OnAfterSetCurrentKey', '', true, true)]
procedure OnGetReceiveOrderLines_OnAfterSetCurrentKey(var _BaseOrderLineElementView: Record "MOB Ns BaseDataModel Element")
begin
// Parameter: "_BaseOrderLineElementView" --> Temporary record representing the Order Lines
end;
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrderLines_OnAfterSetCurrentKey', '', true, true)]
procedure OnGetReceiveOrderLines_OnAfterSetCurrentKey(var _BaseOrderLineElementView: Record "MOB Ns BaseDataModel Element")
begin
_BaseOrderLineElementView.SetCurrentKey(ItemNumber);
_BaseOrderLineElementView.Ascending(false);
end;
See also
-
OnGetPickOrderLines_OnAfterSetFromAnyLine — Populate values on Order Lines displayed at the mobile device (derived from any of four associated line tables). Parameters includes a RecRef-instance for the line table.
-
OnGetReceiveOrderLines_OnAfterSetFromAnyLine — Populate values in Order Lines displayed at the mobile device (derived from any of four associated line tables). Parameters includes a RecRef-instance for the line table.
-
How-to: Sorting of Order Lines — Examples of sorting Order Lines.
Version History
Version | Changes |
---|---|
MOB5.00 | Introduced |