MyLookupAndMyItemReg(VAR XmlCDataSection : DotNet "System.Xml.XmlCDataSection")
// Used for Custom05UnplannedItemReg
AddConfHeaderTextValue(XmlCDataSection,
1, //id
'ID', //name
'Enter ID:', //label
100, //label width
TRUE, //clear on clear
TRUE, //accept barcode
20, //length
TRUE, //optional
'', //search type
'', //eanAi
FALSE); //locked
Step 4: Defining the "Steps" to collect
This is the code that will return the list of results and entries that you require.
This is defined in Codeunit "MOB WMS Adhoc Regstr."
'MyItemReg':
BEGIN
MyItemReg(XMLRequestDoc);
END;
LOCAL MyItemReg(XMLRequestDoc : DotNet "System.Xml.XmlDocument")
// Extract any parameters from the XML
// The parameters are located in the <requestData> element
// The Unplanned Move feature expects 2 header values
// Location and Item
MobXMLMgt.GetDocRootNode(XMLRequestDoc, XMLRequestNode);
MobXMLMgt.FindNode(XMLRequestNode,MobWMSToolbox."CONST::requestData",XMLRequestDataNode);
// -- Now find the "ID"-attribute
MobXMLMgt.FindNode(XMLRequestDataNode,'ID',XMLParameterNode);
// Initialize the response xml
MobBaseToolbox.InitializeRespDocWithoutNS(XMLResultDoc,XMLResponseData);
// Add the <registrationCollectorConfiguration> element
MobXMLMgt.AddElement(XMLResponseData,'registrationCollectorConfiguration','',
MobXMLMgt.GetDocNSURI(XMLResultDoc),
XMLRegCollectorConfiguration);
// Add the <steps> element to the <registrationCollectorConfiguration>
MobXMLMgt.AddElement(XMLRegCollectorConfiguration,'steps','',MobXMLMgt.GetDocNSURI(XMLResultDoc),XMLSteps);
// Add the steps
MobConfTools.RC_Std_Parms(1,
'SomeText',
'Collecting some text',
'',
'Please enter some text');
MobConfTools.RC_Text_XmlNode(XMLSteps,
'',
20);
This will produce one collector step.
Asking for a text value.
Step 5: Handling the "posting" of Unplanned Item Registration
This code read the collected data and posts it.
If this code makes changes to the data the Lookup uses, you will see the result of the posting when the returning to the Lookup.
This is defined in Codeunit "MOB WMS Adhoc Regstr."
'MyItemReg':
BEGIN
Status := PostMyItemReg(XMLRequestDoc);
MobBaseToolbox.CreateSimpleResponse(XMLResultDoc,Status);
END;
Create function "PostMyItemReg" by copying an existing posting function.
Modify the new function to read the "ID" and "SomeText" values.