Versions Compared

Key

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

Use this event to

Excerpt

Create Line Steps for Planned Functions.


See also Understanding Steps

Description

Additional ConfigurationKeys with Steps can be added using a number of "Create"-methods from the input parameter-tableadded using Create-methods.

  1. Set the ConfigurationKey prior to adding new Steps using Steps.CreateConfigurationKey 
  2. Add steps:
  3. "Create_...Step"-methods will take a few, mandatory arguments.
  4. a step using "Create_...Step"-methods usually will offer an alternative argument list (other signature) that includes mandatory arguments as well as most commonly used optional arguments for the Step inputType.method.
  5. Set additional values subsequently using a number of related subsequently using  "Set_"-methods.

...

  1. (Repeat step 2, 3 to add multiple steps)

Template

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

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


Expand
titleClick 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
      Image Added

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
        with _Steps do begin
            InitConfigurationKey_Steps.InitConfigurationKey('CustomReceiveSteps');

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



Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "referencedata" and label = "example" and label = "OnAddRegistrationCollectorConfiguration"

...

VersionChanges
MOB5.14

Introduced

This event succeeds OnGetReferenceData_OnAfterAddRegistrationCollectorConfigurationsAsXml