Use this event to
Excerpt |
---|
Populate values in OrderList 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:
OnGetPickOrders_OnAfterSetFromWarehouseActivityHeader
OnGetPickOrders_OnAfterSetFromPurchaseReturnHeader
OnGetPickOrders_OnAfterSetFromTransferHeader
OnGetPickOrders_OnAfterSetFromSalesHeader
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS ReceiveMOB WMS Pick", 'OnGetReceiveOrdersOnGetPickOrders_OnAfterSetFromAnyHeader', '', true true, true true)]
local procedure OnGetReceiveOrders OnGetPickOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel ElementMOB Ns BaseDataModel Element")
begin
end;
Example 1
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS ReceiveMOB WMS Pick", 'OnGetReceiveOrdersOnGetPickOrders_OnAfterSetFromAnyHeader', '', true true, true true)]
local procedure OnGetReceiveOrders MyOnGetPickOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel ElementMOB Ns BaseDataModel Element")
var
DataTypeManagement: AssignedUserIdFldNoCodeunit "Data Type Management";
NewFieldRef: IntegerFieldRef;
begin
AssignedUserIdFldNo := FieldName2FieldNo if DataTypeManagement.FindFieldByName(_RecRef, NewFieldRef, 'Assigned User ID');
if (AssignedUserIdFldNo <> 0Assigned User ID') then
_BaseOrderElement.SetValue('MyAssignedUserID', 'Assigned toAssigned to: ' + GetValueByFieldNo(_RecRef, AssignedUserIdFldNo CopyStr(NewFieldRef.Value(), 1, NewFieldRef.Length()));
_BaseOrderElement.Set_DisplayLine2('Set from OnGetReceiveOrdersSet from OnGetPickOrders_OnAfterSetFromAnyHeader'); // override value previously set at table event
override value previously set at table event
end;
Example
...
2
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS ReceiveMOB WMS Pick", 'OnGetReceiveOrdersOnGetPickOrders_OnAfterSetFromAnyHeader', '', true true, true true)]
procedure OnGetReceiveOrders local procedure MySortByCustomTag_OnGetPickOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel ElementMOB Ns BaseDataModel Element")
var
DataTypeManagement: AssignedUserIdFldNoCodeunit "Data Type Management";
NewFieldRef: IntegerFieldRef;
begin
AssignedUserIdFldNo := FieldName2FieldNo if DataTypeManagement.FindFieldByName(_RecRef, NewFieldRef, 'Assigned User IDAssigned User ID');
if (AssignedUserIdFldNo <> 0) then
_BaseOrderElement.SetValue('MyAssignedUserIDAssignedUserID', 'Assigned toAssigned to: ' + GetValueByFieldNo(_RecRef, AssignedUserIdFldNo CopyStr(NewFieldRef.Value(), 1, NewFieldRef.Length()));
_HeaderElementBaseOrderElement.Set_Sorting1(_BaseOrderElement.GetValue('AssignedUserID'));
_BaseOrderElement.Set_Sorting2(_BaseOrderElement.Get_BackendID());
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...