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 39 Next »

Description

This describes Line steps used in Planned Functions.

You can conditionally update a steps properties like Default value or Help label.

See the property names here: Step Configuration Matrix


Dynamically Insert Values

Line steps in Planned functions are defined in Reference DataThis makes them static to a degree.

Example

In this example, we will make a step more dynamic by changing values on it, using "RegisterExtraInfo".


Step 1

Create Steps in "ReferenceData".


 

Using event OnGetReferenceData_OnAddRegistrationCollectorConfigurations

  • We name the configuration key "CustomPickSteps". We name each step like Text or Date step. 
  • You can use any naming.


    // Step 1

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Reference Data", 'OnGetReferenceData_OnAddRegistrationCollectorConfigurations''', true, true)]
    local procedure OnGetReferenceData_OnAddRegistrationCollectorConfigurations(var _Steps: Record "MOB Steps Element")
    begin
        // Define a key for the step(s)
        _Steps.InitConfigurationKey('CustomPickStep');

        // Create steps and set default values
        _Steps.Create_InformationStep(5'InfoStep''HeaderText''Label''HelpLabel');
    end;


Step 2

Include the step in "...OnAddStepsToAnyLine"-event


 

Use one of this event:


    // Step 2

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyLine''', true, true)]
    local procedure MyOnGetPickOrderLines_OnAddStepsToAnyLine(_RecRef: RecordRefvar _BaseOrderLineElement: Record "MOB Ns BaseDataModel Element")
    var
        WarehouseActivityLine: Record "Warehouse Activity Line";
    begin
        if (_RecRef.Number = Database::"Warehouse Activity Line"then begin
            _RecRef.SetTable(WarehouseActivityLine);

            // Overwrite Step values with information from pick line 
            _BaseOrderLineElement.Create_StepsByReferenceDataKey(STRSUBSTNO('CustomPickStep{[InfoStep][helpLabel][Description is: "%1"]}', WarehouseActivityLine."Description"));
        end;
    end;


  • Set value "RegisterExtraInfo". 
  • Using this syntax
'StepsConfigurationKey { [StepName] [StepProperty] [Value] }


  • Tip: You must use the same "configurationkey" and "step name" that you choose in the first step.

Result on Mobile


See also

  • No labels