How to create a new Header for Planned functions, in order to filter which documents to include (or exclude). This information applies to allPlanned functions.
Creating new functionality
Creating a new Heade, is only needed when creating new custom functionality.
Perhaps you looking for filtering on existing standard headers?
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations', '', true, true)] localprocedure OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record "MOB HeaderField Element") begin _HeaderFields.InitConfigurationKey('MyReceiptFilters'); // New Header name to use instead of "ReceiveOrderFilters"
// Add standard location filter - this is already handled in standard Receive _HeaderFields.Create_ListField_Location(1);
// Add our new custom filter - this is declared fully. It is a Text field. _HeaderFields.Create_TextField(2, 'DocumentNoFilter'); _HeaderFields.Set_label('Doc. filter label:'); _HeaderFields.Set_clearOnClear(true); _HeaderFields.Set_acceptBarcode(true); _HeaderFields.Set_length(20); _HeaderFields.Set_optional(true); end;
Tip
Note how helper-functions like Add_Location and Add_TextValue are used