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 44 Current »

Use this event to

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

  1. Set the ConfigurationKey prior to adding new Steps using Steps.CreateConfigurationKey 
  2. Add steps:
    1. "Create_...Step"-methods will take a few, mandatory arguments.
    2. "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..
  3. Set additional values subsequently using a number of related "Set_"-methods.




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

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

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

  • No labels