Collector steps are define in "Reference Data". Making them static to a degree.
However, often you want the step to have a Default Value or other information related to the current Line.
In this example we will make a Collector Step on a Line dynamic by adding the relevant "Item No." as Default value and as a Help Text
Note: Please start by following a complete example of adding a Collector Step on Line basis.
How to enable
Step 1 - Add/Define the collector step in Reference Data
Block 2: Codeunit 6181381 TF Mobile WMS Reference Data
...
// Example of making a step dynamic
MobConfTools.RC_Std_Parms(1,'MyTextStep','Enter my text','','Please confirm my text');
MobConfTools.RC_Text_CData(XMLCDataSection,'',20); // Default value = blank because it will be injected dynamically from the Line
Step 2 - Include the step in a Warehouse functionality like Pick
Codeunit 6181388 MOB WMS Toolbox
IF WhseActHeader.Type IN [WhseActHeader.Type::Pick,WhseActHeader.Type::"Invt. Pick"] THEN
MobXMLMgt.AddElement(XMLOrderLine,'RegisterExtraInfo',
STRSUBSTNO('DemoOrderLineExtraInfo{[MyTextStep][defaultValue][%1][MyTextStep][helpLabel][We expect "%1"]}',WhseActLinePlace."Item No."),
NS_BASE_DATA_MODEL,XMLCreatedNode);