...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Use this event to
Excerpt |
---|
Filter Production Order Lines orders (Assembly Headers) to be displayed at the mobile device. |
Description
Affects which Production Order Lines Assembly Headers are displayed. This This event "handles" each filter.
With this event you can perform can perform basic record filtering of Assembly Orders Lines.
See also: OnGetAssemblyOrders_OnIncludeAssemblyHeader
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdOrderLinesOnGetAssemblyOrders_OnSetFilterProdOrderLineOnSetFilterAssemblyHeader', '', true, true)]
local procedure OnGetProdOrderLines OnGetAssemblyOrders_OnSetFilterProdOrderLineOnSetFilterAssemblyHeader(_HeaderFilter: Record "MOB NS Request Element"; var _ProdOrderLineAssemblyHeader: Record "Prod. Order LineAssembly Header"; var _ProductionOrderAssemblyLine: Record "Production OrderAssembly Line"; var _IsHandled: Boolean)
begin
end;
Example
// [Example] Display all production orders instead of empty list if StartingDate Display all assembly orders instead of empty list if StartingDate-filter excludes everything
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdOrderLinesOnGetAssemblyOrders_OnSetFilterProdOrderLineOnSetFilterAssemblyHeader', '', true, true)]
local procedure MyOnGetProdOrderLines MyOnGetAssemblyOrders_OnSetFilterProdOrderLineOnSetFilterAssemblyHeader(_HeaderFilter: Record "MOB NS Request Element"; var _ProdOrderLineAssemblyHeader: Record "Prod. Order LineAssembly Header"; var _ProductionOrderAssemblyLine: Record "Production OrderAssembly Line"; var _IsHandled: Boolean)
var
StartingDate: Date;
begin
if _HeaderFilter.Name = 'StartingDate' then begin
StartingDate := _HeaderFilter.GetValueAsDate();
if StartingDate <> 0D then
_ProdOrderLineAssemblyHeader.SetFilter("Starting Date-Time", '<%1<=%1', CreateDateTime(StartingDate + 1, 0T)) StartingDate);
if _ProdOrderLineAssemblyHeader.IsEmpty() then
_ProdOrderLineAssemblyHeader.SetRange("Starting Date-Time");
_IsHandled := true;
end;
end;
Example 2: Add custom filters to Standard headers
You want to add an additional filter to a existing header.
Example 3: Handle custom header filter
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5.2224 | Introduced |