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

Use this event to

Update properties for an existing header step (usually a customized step from another app)

Description

Header steps are executed..

  • after all lines have been registered at the mobile device, and "Post the order?" page was accepted.
  • when the mobile user manually select "Post" 


Template

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep', '', true, true)]
    local procedure OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
    begin
    end;

Example

    //
    // [Example]: Update defaultvalue for a custom header step  (a step created from another app)
    //


    // Imitate some custom step from another app (for this example, mirror the Pack&Ship StagingHint-step
    // Creating a new step should really happen in the other app and are included here for the example only.
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeader', '', true, true)]
    local procedure OnGetPickOrderLines_OnAddStepsToAnyHeader(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
    var
        MobLanguage: Codeunit "MOB WMS Language";
    begin
        _StepsElement.Create_TextStep(61020, 'StagingHint');
        _StepsElement.Set_header('Staging Hint');
        _StepsElement.Set_label('');
        _StepsElement.Set_helpLabel('Shipment area staging bin');
        _StepsElement.Set_defaultValue('');
        _StepsElement.Set_length(50);
        _StepsElement.Set_optional(true);
    end;

    // Update properties for an existing header step (usually a customized step from another app)
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep', '', true, true)]
    local procedure MyOnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
    begin
        if _StepsElement.Get_name() = 'StagingHint' then begin
            _StepsElement.Set_defaultValue('MyNewDefaultStagingHintValue');
            _StepsElement.Save();
        end;
    end;



More examples


Version History

VersionChanges
MOB5.34Introduced
  • No labels