Versions Compared

Key

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

Use this event to

Excerpt
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.

...


Template

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

 


Example

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS ReceiveMOB WMS Receive", 'OnGetReceiveOrderLines_OnAfterSetFromAnyLine', '', true true, true true)]
    procedure OnGetReceiveOrderLines My01OnGetReceiveOrderLines_OnAfterSetFromAnyLine(_RecRef: RecordRef; var _BaseOrderLineElement: Record "MOB Ns BaseDataModel ElementMOB Ns BaseDataModel Element")
    var
        Item:     Item: Record Item Item;
    begin
     with         _BaseOrderLineElement do begin
          .Set_DisplayLine2('Set from OnReceiveOnAfterSetFromAnyLineSet from OnReceiveOnAfterSetFromAnyLine');

          // Under Under-/OverDeliveryValidation OverDeliveryValidation - The choices are The choices are: None None, Warn Warn, Block
           Block
        _BaseOrderLineElement.Set_UnderDeliveryValidation('None');
                  _BaseOrderLineElement.Set_OverDeliveryValidation('None');
          Item
        Item.Get(_BaseOrderLineElement.Get_ItemNumber());
          SetValue        _BaseOrderLineElement.SetValue('SpecialEquimentCode', Item Item."Special Equipment CodeSpecial Equipment Code");
         end;end;

 


Example: Sort lines by custom tag

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS ReceiveMOB WMS Receive", 'OnGetReceiveOrderLines_OnAfterSetFromAnyLine''', true true, true true)]
    procedure OnGetReceiveOrderLines My02OnGetReceiveOrderLines_OnAfterSetFromAnyLine(_RecRef: RecordRefvar _BaseOrderLineElement: Record "MOB Ns BaseDataModel ElementMOB Ns BaseDataModel Element")
    var
     Item        ItemRecord Item;
    begin
     with _LineElement do begin
          // New custom tag
          Item        // New custom tag
        Item.Get(_BaseOrderLineElement.Get_ItemNumber());
                  _BaseOrderLineElement.SetValue('SpecialEquimentCode', Item Item."Special Equipment CodeSpecial Equipment Code");

            // Sort by custom tag
           Sort by custom tag
        _BaseOrderLineElement.Set_Sorting1(_BaseOrderLineElement.GetValue('SpecialEquimentCode'));
         end;
end



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

...