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::Codeunit, Codeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnAfterSetFromAnyHeader', '', true, true)]
local procedure OnGetReceiveOrders_OnAfterSetFromAnyHeader(_RecRef: RecordRef; var _BaseOrderElement: Record "MOB Ns BaseDataModel Element")
var
MobToolbox: Codeunit "MOB Toolbox";
begin
_BaseOrderElement.Set_HeaderLabel1(_BaseOrderElement.Get_HeaderLabel1() + MobToolbox.CRLFSeparator() + 'MyLabel');
_BaseOrderElement.Set_HeaderValue1(_BaseOrderElement.Get_HeaderValue1() + MobToolbox.CRLFSeparator() + 'MyValue');
end;
Available events:
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|