OnGetReferenceData_OnAfterAddDataTableEntry
Use this event to
Modfy properties for any single DataTable-"entry" from standard or custom DataTables ("ListData").
Description
This event is executed once for every DataTable-"entry" added to standard as well as custom DataTables. You may use this event to change any property of the "entry".
See also: OnGetReferenceData_OnAddDataTables
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddDataTableEntry', '', true, true)]
local procedure OnGetReferenceData_OnAfterAddDataTableEntry(var _DataTable: Record "MOB DataTable Element")
begin
end;
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddDataTableEntry', '', true, true)]
local procedure MyOnGetReferenceData_OnAfterAddDataTableEntry(var _DataTable: Record "MOB DataTable Element")
begin
// Standard ReferenceData will write ReasonCode.Code and ReasonCode.Description to file without checking for blank values.
// Not every ReasonCode have meaningfull descriptions in this database: Fill in blank Names with Code instead
if (_DataTable.DataTableId = 'ReasonCode') and (_DataTable.Get_Name() = '') then
_DataTable.Set_Name(_DataTable.Get_Code());
// Replace Name with code for specific UnitOfMeasure Codes (not all)
if (_DataTable.DataTableId = 'UnitOfMeasure') and ((_DataTable.Get_Code() in ['KG', 'KM', 'L'])) then
_DataTable.Set_Name(_DataTable.Get_Code());
end;
More examples
There are no items with the selected labels at this time.
Version History
Version | Changes |
---|---|
MOB5.15 | Introduced |