Versions Compared

Key

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


Info
titleMinimum Requirements
  • Android App 1.8.1.1

...

    //Step 1: Create a simple ImageCapture header step
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistration_OnAddSteps', '', true, true)]
    localprocedure MyOnPostAdhocRegistration_OnAddSteps(_RegistrationType: Text; var _RequestValues: Record"MOB NS Request Element"; var _Steps: Record"MOB Steps Element"; var _RegistrationTypeTracking: Text)
    var
        MobWmsToolbox: Codeunit"MOB WMS Toolbox";
    begin
        if _RegistrationType <> MobWmsToolbox."CONST::AdjustQuantity"() then
            exit;

        //Already collected, break to avoid adding the same new step indefinitely
        if _RequestValues.HasValue('ImageCapture') then
            exit;

        _Steps.Create_ImageCaptureStep(10000, 'ImageCapture');
        _Steps.Set_helpLabel('Take a picture of the item');
    end;

Step 2: Handle the step

...

//Step 2: Handle the ImageCapture step. The picture taken will be saved in the MOB Wms Media Queue
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistration_OnAfterPost', '', true, true)]
    localprocedure MyOnPostAdhocRegistration_OnAfterPost(_MessageId: Guid; _RegistrationType: Text; var _RequestValues: Record"MOB NS Request Element"; var _XmlResponseDoc: XmlDocument; var _RegistrationTypeTracking: Text)
    var
        MobMedia: Codeunit"MOB WMS Media";
        MobWmsToolbox: Codeunit"MOB WMS Toolbox";
        Image: Text;
    begin
        if _RegistrationType <> MobWmsToolbox."CONST::AdjustQuantity"() then
            exit;
        if _RequestValues.GetValue('ImageCapture') <>''thenbegin
            Image:=_RequestValues.GetValue('ImageCapture');


            MobMedia.AddImageToMediaQueue(Image);
        end;
    end;

...

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
reversetrue
excerptTypesimple
cqllabel = in ( "integrationevent" , "example" ) and label = "unplannedimage"