Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleWho is affected?


Breaking changes in MOB5.14 affects specifically environments with customizations to ReferenceData using the events originally introduced in MOB5.00.
The database schema is still backwards compatible.

If you have no customizations to ReferenceData you will not be affected and should have no issues upgrading.


What has changed?

Version MOB5.14 includes refactored functionality for creating ReferenceData Headers and -Steps (headerConfigurations and registrationCollectorConfigurations).
We are introducing a new syntax that will allow our partners to work with ReferenceData without knowing or understanding the specifics of the underlying Xml-response.

...

          OnGetReferenceData_OnAddHeaderConfigurations
          OnGetReferenceData_OnAfterAddHeaderField

When will I need to update my existing customizations?

When installed on-premise:

...

  • In general you manually controls when an extension is updated in an existing environment (by uninstalling/reinstalling/upgrading the extension).
  • However, during next major version deployment you will likely be auto-updated to latest Mobile WMS al extension version (April, October).
  • It is recommended to update your Mobile WMS al extension to latest version prior to next major launch to avoid issues during that upgrade process.

How to rewrite your existing customization

Rewrite your existng OnGetReferenceData_OnAfterCreateHeaderConfigurations eventsubscriber to use OnGetReferenceData_OnAddHeaderConfigurations instead.

All references to Record "MOB RefD HeaderConfig Element" should now be Record "MOB HeaderField Element".
Existing calls to helper methods on this input parameter table must be changed to follow new naming conventions (see examples below).

Example - existing code from MOB5.00 - MOB5.13

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAfterCreateHeaderConfigurations''', true, true)]

    local procedure OnGetReferenceData_OnAfterCreateHeaderConfigurations(var _HeaderConfigurationElement: Record "MOB RefD HeaderConfig Element")
    begin
        with _HeaderConfigurationElement do begin
            Create('CustomPrintLabel')// New ConfigurationKey


            // ItemNumber
            Add_TextValue(
                1//id
                'ItemNumber'//name
                CopyStr(MobWmsLanguage.GetMessage('ITEM'':'1100)//label
                100//label width
                true, //clear on clear
                true, //accept barcode
                30//length
                false, //optional
                'ItemSearch'//search type
                CopyStr(MobBaseToolbox.GetItemNoGS1Ai()130)//ean GS1Ai
                false)//locked

                // Lot Number
            Add_TextValue(
                2//id
                'LotNumber'//name
                CopyStr(MobWmsLanguage.GetMessage('LOT_NO_LABEL'':'1100)//label
                100//label width
                true, //clear on clear
                true, //accept barcode
                30//length
                false, //optional
                ''//search type
                CopyStr(MobBaseToolbox.GetLotNoGS1Ai()130)//ean GS1Ai
                false)//locked
        end;
    end;


Example 1 - new code (1:1 conversion)

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations''', true, true)]
    local procedure My01OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record "MOB HeaderField Element")
    var
        MobToolbox: Codeunit "MOB Toolbox";
        MobWmsLanguage: Codeunit "MOB WMS Language";
    begin
        _HeaderFields.InitConfigurationKey('CustomPrintLabel')// New ConfigurationKey


        // Field: ItemNumber
        _HeaderFields.Create_TextField(1'ItemNumber');
        _HeaderFields.Set_label(MobWmsLanguage.GetMessage('ITEM'':');
        _HeaderFields.Set_clearOnClear(true);
        _HeaderFields.Set_acceptBarcode(true);
        _HeaderFields.Set_length(20);
        _HeaderFields.Set_searchType('ItemSearch');
        _HeaderFields.Set_eanAi(MobToolbox.GetItemNoGS1Ai());
        // Default values no longer needs to be set:
        // _HeaderFields.Set_labelWidth(100);
        // _HeaderFields.Set_optional(false);
        // _HeaderFields.Set_locked(false);

        // Field: LotNumber
        _HeaderFields.Create_TextField(2'LotNumber');
        _HeaderFields.Set_label(MobWmsLanguage.GetMessage('LOT_NO_LABEL'':');
        _HeaderFields.Set_clearOnClear(true);
        _HeaderFields.Set_acceptBarcode(true);
        _HeaderFields.Set_length(20);
        _HeaderFields.Set_eanAi(MobToolbox.GetLotNoGS1Ai());
        // Default values no longer needs to be set:
        // _HeaderFields.Set_searchType('');
    end;



Example 2 - new code using templates - then setting only properties different from the template (if any)

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddHeaderConfigurations''', true, true)]
    local procedure My02OnGetReferenceData_OnAddHeaderConfigurations(var _HeaderFields: Record "MOB HeaderField Element")
    begin
        _HeaderFields.InitConfigurationKey('CustomPrintLabel')// New ConfigurationKey


        // ItemNumber by template
        _HeaderFields.Create_TextField_ItemNumber(1);
        _HeaderFields.Set_length(20);

        // LotNumber by template
        _HeaderFields.Create_TextField_LotNumber(2);
        _HeaderFields.Set_length(20);
    end;