Use this event to
Excerpt |
---|
Modfy properties for any single DataTable-"entry" from standard or custom DataTables ("ListData"). |
...
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
// [Example]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddDataTableEntry', '', true, true)]
local procedure MyOnGetReferenceData_OnAfterAddDataTableEntry(var _DataTable: Record "MOB DataTable Element")
begin
with _DataTable do begin
// Standard ReferenceData will write ReasonCode.Code and ReasonCode.Description to file without checking for blank values.
// Not every ReasonCode or ReturnReasonCode have meaningfull descriptions in this database Not every ReasonCode have meaningfull descriptions in this database: Fill in blank Names Fill in blank Names with Code instead
if (DataTableId = 'ReasonCode') and (Get_Name() = '') then
Set_Name(Get_Code());
if (DataTableId = 'ReturnReasonCode') and (Get_Name() = '') then
Set_Name(Get_Code());
// Replace Name with code for specific UnitOfMeasure Codes (not all)
if (DataTableId = 'UnitOfMeasure') and ((Get_Code() in ['KG', 'KM', 'L'])) then
Set_Name(Get_Code());
end;
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...