Versions Compared

Key

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

...

This information is collected when a document is posted. This happens after the line information has been registered.

...

For example

I.e. when posting a Receive order, an Delivery Note is collected as standard.

How to use it

In the following two different solutions are demonstrated.

Choose the right example for your task.

Example 1: You are using Warehouse Documents

Example 2: You are Picking/Receiving directly on Orders


Example 1: (Warehouse Documents)

Step 1:

...

Collect two additional Text Steps

Below is sample code for collection two additional Text Steps.

...


Insert the following code block in Function "CreateWhseActLinesResponse" in Codeunit 6181388 WMS Toolbox


Code Block
languagevb
titleInsert into: Codeunit 6181388 WMS Toolbox
// >>>> CUSTOM HEADER STEPS

// Add the order level registration configuration
// Add the <registrationCollectorConfiguration> element
MobXMLMgt.AddElement(XMLResponseData,                             // Add to this Node
                     'registrationCollectorConfiguration',        // Name
                     '',                                          // Text
                     XMLResultDoc.DocumentElement.NamespaceURI,   // NameSpace
                     XMLRegCollectorConfiguration);               // New created node

// Add the <steps> element to the <registrationCollectorConfiguration>
MobXMLMgt.AddElement(XMLRegCollectorConfiguration,'steps','',XMLResultDoc.DocumentElement.NamespaceURI,XMLSteps);
// Init collector parameters
MobConfTools.RC_Std_Parms(1,                   // ID
                          'Text1',             // Name
                          'Enter some data',   // Header
                          'Data',              // Label
                          '');                 // Help Label
MobConfTools.RC_Text_XmlNode(XMLSteps,'',20);
MobConfTools.RC_Std_Parms(2,                   // ID
                          'Text2',             // Name
                          'Enter more data',   // Header
                          'More data',         // Label
                          '');                 // Help Label
// Create collector XML-Node
MobConfTools.RC_Text_XmlNode(XMLSteps,'',20);

// <<<< CUSTOM HEADER STEPS


Image Added


Step 2: Read and handle the collected data 


Insert the following code block in the top of Function "CreateWhseActLinesResponsePostWhseActOrder" in Codeunit 6181388 WMS Toolbox

...

Code Block
languagexml
titleInsert into: Codeunit 6181388 WMS Toolbox
// >>>> CUSTOM HEADER STEPS

MobXMLMgt.GetDocRootNode(XMLRequestDoc, XMLRequestNode);
MobXMLMgt.FindNode(XMLRequestNode,'requestData',XMLRequestDataNode);

// The requestData element only contains one Order element (validated by the schema)
MobXMLMgt.GetNodeFirstChild(XMLRequestDataNode, XMLOrderNode);

// Get the Custom step value
MobXMLMgt.GetAttribute(XMLOrderNode,'Text1',AttributeValue);
MobXMLMgt.GetAttribute(XMLOrderNode,'Text2',AttributeValue);

ERROR('Step value %1',AttributeValue);

// <<<< CUSTOM HEADER STEPS


The error message will be shown on the mobile device.

You will need to handle the collected values from here on.



...



Example 2: (Order Documents)

Step 1: Collect two additional Text Steps

Below is sample code for collection two additional Text Steps.


Insert the following code block in the respective functional Codeunit (Receive,Pick etc.)

...

Step 2: Handle the collected datadata 


Code Block
languagexml
titleCodeunit 6181374 WMS Pick
// >>>> CUSTOM HEADER STEPS

MobXMLMgt.GetAttribute(XMLOrderNode,'Text1',AttributeValue);
MyText1Variable := AttributeValue;


MobXMLMgt.GetAttribute(XMLOrderNode,'Text2',AttributeValue);
MyText2Variable := AttributeValue;

// << HEADER STEP


You will need to handle the collected values from here on.