Add a Collector Step (Line Level) (List on Receive)

Another example 

This is an additional example of how to add a collector step to a Planned process like Receiving.


This example is an List step on Receive.


Standard workflow collector steps

  1. From Bin
  2. To Bin
  3. Expiration Date
  4. Lot No.
  5. Tote ID
  6. Serial No.
  7. Quantity

How to enable

Step 1 - Add/Define the collector step in Reference Data

When a device log in, Reference Data is sent to the device. We need to include the definition of our collector to the Reference data.

We will name our collector step "DemoOrderLineExtraInfo".


Add the following code blocks:

Block 1: Codeunit 6181381 TF Mobile WMS Reference Data
CreateConfigRegCollConf(XMLResponseData,'DemoOrderLineExtraInfo');



Block 2: Codeunit 6181381 TF Mobile WMS Reference Data
CASE Key OF
  'DemoOrderLineExtraInfo':
    BEGIN
      MobConfTools.RC_Std_Parms(1,'ItemCategoryList','Item Category','','The Category this item belongs to');
      MobConfTools.RC_Ext_Parms('00',TRUE,FALSE,TRUE,100);
      MobConfTools.RC_List_TableData_CData(XMLCDataSection,'ItemCategoryList','Code','Code','');
    END;
END;


Make a new function called "AddItemCategoryList".

Copy an existing function so you get "XMLResponseData" as DotNet parameter.

Block 2: Codeunit 6181381 TF Mobile WMS Reference Data
MobXMLMgt.AddElement(XMLResponseData,'ItemCategoryList','','',XMLLocationNode);
MobXMLMgt.AddElement(XMLLocationNode,'Code','Damaged','',XMLCreatedNode);

MobXMLMgt.AddElement(XMLResponseData,'ItemCategoryList','','',XMLLocationNode);
MobXMLMgt.AddElement(XMLLocationNode,'Code','Damp','',XMLCreatedNode);

MobXMLMgt.AddElement(XMLResponseData,'ItemCategoryList','','',XMLLocationNode);
MobXMLMgt.AddElement(XMLLocationNode,'Code','Scratched','',XMLCreatedNode);


Go to function "GetReferenceData".

Add a call to AddItemCategoryList" below the comment "// Add the tables"

Block 2: Codeunit 6181381 TF Mobile WMS Reference Data
...
// Add the tables
AddItemCategoryList(XMLReferenceData);
...

Step 2 - Include the step in the Receive functionality

The function CreateOrderLinesResponse is responsible for the reply to the device, including which values to collect.

We will add the following code block have it include our DemoOrderLineExtraInfo.
Add you own conditions to when the step should be included, in example, certain items.


Codeunit 6181372 MOB WMS Receive
// Example of how to register an extra step when registering on an order line
MobXMLMgt.AddElement(XMLOrderLine,'RegisterExtraInfo','DemoOrderLineExtraInfo',BaseDataModelNS,XMLCreatedNode);


The result should look like this




Step 3 - Handle the Posting

The XML Request from the scanner, will look like this.


Note the "ExtraInfo" tag with the "ItemCategory" tag included, along with the value.


Save the data

Go to codeunit 6181372 MOB WMS Receive

Follow the PostOrder(); -function call to "SaveRegistrationData".

Note where the 'ExtraInfo' XML tag is handled.


Use the following snippet to extract the value

Codeunit 6181388 MOB WMS Toolbox
IF XMLExtraInfoElementNode.Name = 'ItemCategoryList' THEN
  MyNewFieldHere := XMLRegistrationElementNode.InnerText);


"MyNewFieldHere" is a field, that you add to the table 6181372 "MOB WMS Registration".



Use the data

Proceed to use the data in the following code, by reading the "MobileWMSRegistration" variable