OnGetReferenceData_OnAddRegistrationCollectorConfigurations

Use this event to

Create Line Steps for Planned Functions.

See also Understanding Steps

Description

Additional ConfigurationKeys with Steps can be added using Create-methods.

  1. Set the ConfigurationKey prior to adding new Steps using Steps.CreateConfigurationKey 
  2. Add a step using "Create_...Step"-method.
  3. Set additional values subsequently using  "Set_"-methods.
    (Repeat step 2, 3 to add multiple steps)

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddRegistrationCollectorConfigurations''', true, true)]
    local procedure OnGetReferenceData_OnAddRegistrationCollectorConfigurations(var _Steps: Record "MOB Steps Element")
    begin
        _Steps.InitConfigurationKey(...);

        _Steps.Create_...Step(...);
        _Steps.Set_...
        _Steps.Set_...
        (...)

        _Steps.Create_...Step(...);
        _Steps.Set_...
        _Steps.Set_...
        (...)
  end;


 Click to see event parameters...
  • _Steps
    • Accessor table "MOB Steps Element"
      • Use this to create at new Reference Data "ConfigurationKey" that holds a number of steps.
      • Add the steps using "Create_..."-functions. 
      • Change/Set step-properties using "Set_..."-functions

Create Step Example

  • Add the steps using "Create_..."-functions. 
    • Create_TextStep = Create a new step to collect Text
    • Create_TextStep_ItemNumber = Create a new Text step prepared to collect an Item No.
       
    • Create_DateStep = Create a new step to collect Date
    • Create_DateStep_ExpirationDate = Create a new Date step prepared to collect an expiration date
    • Create_ListStep_Variant = Create a new List step prepared to display available Variants of an Item
    • Create_ListStep_UoM = Create a new List step prepared to display available Units of Measure of an Item
    • And many more. Use the VS Code to explore all the options

Set Step Properties Example

  • Set_header('Text header')
  • Set_label('Text label');
  • Set_helpLabel('Text helpLabel');
  • Set_optional(false);
  • Set_defaultValue(1);
  • And many more. Use the VS Code to explore all the options


Example

    //
    // Create new RegistrationCollectorConfiguration-Key in reference data with two steps named: "CustomGrossWeightGrams" and "CustomNetWeightGrams"
    // 
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddRegistrationCollectorConfigurations''', true, true)]
    local procedure My01OnGetReferenceData_OnAddRegistrationCollectorConfigurations(var _Steps: Record "MOB Steps Element")
    begin
        _Steps.InitConfigurationKey('CustomReceiveSteps');

        _Steps.Create_DecimalStep(10000'CustomNetWeightGrams');
        _Steps.Set_header('Net Weight (Grams)');
        _Steps.Set_label('Net Weight (Grams):');
        _Steps.Set_helpLabel('Net Weight in Grams per Base Unit of Measure');
        _Steps.Set_minValue(0);
        _Steps.Set_maxValue(100000);
        _Steps.Set_performCalculation(true);

        _Steps.Create_DecimalStep(20000'CustomGrossWeightGrams');
        _Steps.Set_header('Gross Weight (Grams)');
        _Steps.Set_label('Gross Weight (Grams):');
        _Steps.Set_helpLabel('Gross Weight in Grams per Base Unit of Measure');
        _Steps.Set_minValue(0);
        _Steps.Set_maxValue(100000);
        _Steps.Set_performCalculation(true);
    end;



More examples

Version History

VersionChanges
MOB5.14

Introduced

This event succeeds OnGetReferenceData_OnAfterAddRegistrationCollectorConfigurationsAsXml