Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Use this event to

Populate values in OrderList 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:


Template

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader''', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRefvar _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
beginend;


Example

[EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader''', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRefvar _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
     AssignedUserIdFldNo: Integer;
begin
     AssignedUserIdFldNo := FieldName2FieldNo(_RecRef, 'Assigned User ID');
     if (AssignedUserIdFldNo <> 0then
          _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::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader''', true, true)]
procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRefvar _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
     AssignedUserIdFldNo: Integer;
begin
     AssignedUserIdFldNo := FieldName2FieldNo(_RecRef, 'Assigned User ID');
     if (AssignedUserIdFldNo <> 0then
          _BaseOrderElement.SetValue('MyAssignedUserID''Assigned to: ' + GetValueByFieldNo(_RecRef, AssignedUserIdFldNo));

     _HeaderElement.Set_Sorting1(GetValue('AssignedUserID'));
end;


More examples


Version History

VersionChanges
MOB5.00Introduced
  • No labels