Versions Compared

Key

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


Info
titleMinimum Requirements
  • Extension version MOB5.3334
  • Android App 1.5.912

Use this event to

Excerpt

Return extra steps based on already collected values.

Description

You can use Whse. Inquiry to perform instant Online validationValidation of a steps input value. 

...

Note

You may validate the current steps value prior to returning new steps. In this case you mustuse the OnWhseInquiryOnCustomDocumentType event.
If the OnWhseInquiryOnCustomDocumentTypeAsXml event was used for such validation the full response Xml has been generated already and cannot be further modified by this event set the includeCollectedValues property in application.cfg (see below).



Template

    // [Template]
        [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Whse. Inquiry", 'OnWhseInquiry_OnAddSteps''', true, true)]
    local procedure OnWhseInquiry MyOnWhseInquiry_OnAddSteps(_DocumentType: Textvar _RequestValues: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps ElementMOB Steps Element"; var _RegistrationTypeTracking: Textvar  _IsHandled:  Boolean)
    begin
    end;

...


    // [Example 1]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Whse. Inquiry", 'OnWhseInquiry_OnAddSteps''', true, true)]
    local procedure Ex01_OnWhseInquiry_OnAddSteps(_DocumentType: Textvar _RequestValues: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps Element"; var _IsHandled: Boolean)
    begin
        case _DocumentType of
            'ValidateMyLotNumber':
                begin
                    _Steps.Create_TextStep(10'MyTextStep1');
                    _Steps.Set_defaultValue('MyTextDefaultValue1');
                    _Steps.Set_header('MyTextStep1 - ' + _RequestValues.Get_LotNumber());   // Reading value from already collected step

                                        _Steps.Create_TextStep(20'MyTextStep2');
                    _Steps.Set_defaultValue('MyTextDefaultValue2');
                    _Steps.Set_header('MyTextStep2');
                    exit
                    _IsHandled := true;
                end;

            'ValidateMyQuantity':
                begin
                    _Steps.Create_TextStep(10'MyQtySteps1');
                    _Steps.Set_defaultValue('MyQtySteps1');
                    _Steps.Set_header('MyQtySteps1 - ' + Format(_RequestValues.Get_Quantity()));   // Reading value from already collected step

                    _Steps.Create_TextStep(20'MyQtySteps2');
                    _Steps.Set_defaultValue('MyQtySteps2');
                    _Steps.Set_header('MyQtySteps2');
                    exit
                    _IsHandled := true;

                end;
            else
                exit;
        end;
    end;


Related change to application.cfg:
Each new DocumentType to be validated DocumentType must have a related change to the a service-section in the application.cfg. In this example, the service for the Pick page is modified. See further examples in For additional examples, see the links below.

Code Block
titleapplication.cfg
    <service id="Pick" type="Order" orderType="Pick">
      <requests>
        <getOrders>GetPickOrders</getOrders>
        <getOrderLines>GetPickOrderLines</getOrderLines>
        <postOrder>PostPickOrder</postOrder>
      </requests>
      <validation>
        <lotNumberValidation documentName="ValidateMyLotNumber" online="true" includeCollectedValues="true"/>
        <quantityValidation documentName="ValidateMyQuantity" online="true" includeCollectedValues="true"/>
      </validation>
    </service>

...

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "example" and label in ("onwhseinquiryoncustomdocumenttypeasxml","onwhseinquiryonaddsteps","onwhseinquiryoncustomdocumenttype")


Version History

VersionChanges
MOB5.
33
34Introduced
MOB5.36.xxx.208_IsHandled parameter added