Versions Compared

Key

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

Description

Excerpt

Modify text in the top of Order Lines.

See also: How-to: Modify DisplayLines


Order lines

The Order lines page have two available lines in the header.


Event Subscriber

Subscribe to an "OnAfterSetFrom"-event and use the Set_HeaderLabel and Set_HeaderValue1/2.

Tips:

  • Use Get_HeaderLabel/Value to read the existing content. This way, you and postfix any information you want to the existing text.
  • Use CRLF to inject more lines into the two existing headers


Example

In this example we add a new Header and Value in between the existing.


    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader''', true, true)]
    procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRefvar _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
    var
        MobToolbox: Codeunit "MOB Toolbox";
    begin
        _BaseOrderElement.Set_HeaderLabel1(_BaseOrderElement.Get_HeaderLabel1() + MobToolbox.GetCRLF() 'MyLabel');
        _BaseOrderElement.Set_HeaderValue1(_BaseOrderElement.Get_HeaderValue1() + MobToolbox.GetCRLF() 'MyValue');
    end;



Available events:

Filter by label (Content by label)
showLabelsfalse
max90
showSpacefalse
sorttitle
cqllabel = "bc" and label = "orders" and label = "integrationevent" and label = "onaftersetfrom" and ancestor = "47220743"