Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

...


Template

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


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;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "orders" and label = "example" and label = "onaftersetfrom"

...