Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

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 DataTable.


See also:
OnGetReferenceData_OnAddDataTables


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddDataTableEntry''', true, true)]
    local procedure OnGetReferenceData_OnAfterAddDataTableEntry(var _DataTable: Record "MOB DataTable Element")
    begin
    end;

Example

    // [Example]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterAddDataTableEntry''', true, true)]
    local procedure MyOnGetReferenceData_OnAfterAddDataTableEntry(var _DataTable: Record "MOB DataTable Element")
    begin
        with _DataTable do begin
            // Not every ReasonCode or ReturnReasonCode have meaningfull descriptions in this database: Fill in blank Names
            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;


More examples

There are no items with the selected labels at this time.

Version History

VersionChanges
MOB5.15Introduced
  • No labels