Use this event to
Populate Orders displayed at the mobile device (derived from any of four associated header tables). Parameters includes a RecRef-instance for the header table.
This event is executed after each of these following events have been executed already:
OnGetReceiveOrders_OnAfterSetFromWarehouseReceiptHeader
OnGetReceiveOrders_OnAfterSetFromPurchaseHeader
OnGetReceiveOrders_OnAfterSetFromTransferHeader
OnGetReceiveOrders_OnAfterSetFromSalesReturnHeader
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader', '', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
begin
end;
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader', '', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
AssignedUserIdFldNo: Integer;
begin
AssignedUserIdFldNo := FieldName2FieldNo(_RecRef, 'Assigned User ID');
if (AssignedUserIdFldNo <> 0) then
_BaseOrderElement.SetValue('MyAssignedUserID', 'Assigned to: ' + GetValueByFieldNo(_RecRef, AssignedUserIdFldNo));
_BaseOrderElement.Set_DisplayLine2('Set from OnGetReceiveOrders_OnAfterSetFromAnyHeader'); // override value previously set at table event
end;
Example: Sort by custom tag
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader', '', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
AssignedUserIdFldNo: Integer;
begin
AssignedUserIdFldNo := FieldName2FieldNo(_RecRef, 'Assigned User ID');
if (AssignedUserIdFldNo <> 0) then
_BaseOrderElement.SetValue('MyAssignedUserID', 'Assigned to: ' + GetValueByFieldNo(_RecRef, AssignedUserIdFldNo));
_HeaderElement.Set_Sorting1(GetValue('AssignedUserID'));
end;
More examples
-
How-to: Modify DisplayLines — Additional text displayed on a List.
-
How-to: Modify HeaderLabel and HeaderValue — Modify text in the top of Order Lines
-
How-to: Sorting of Orders — Examples of sorting Order list
Version History
Version | Changes |
---|---|
MOB5.00 | Introduced |