Introduction
Unplanned Functions (Ad-hoc) collector steps can also be used with Online Validation to check the user entered data.
This is an example of how to add Serial Number Validation to "Unplanned Move"
Step 1:
Please follow Online validation to enable online validation.
Step 2
This will add the necessary functions to enable Online Validation.
Step 2.1
Create the following (non-local) function "RC_SetOnlineValidationName" in codeunit "MOB WMS Conf. Tools"
RC_SetOnlineValidationName(_Name : Text) OnlineValidationName := _Name;
Step 2.2
Create a global variable "OnlineValidationName" of type Text
Step 2.3
Add the following to the end of function "RC_Step_XmlNode"
IF OnlineValidationName <> '' THEN BEGIN MobXMLMgt.AddElement(XMLAddElement,'onlineValidation','',XMLSteps.NamespaceURI,XMLAddElement); MobXMLMgt.AddAttribute(XMLAddElement,'documentName',OnlineValidationName); MobXMLMgt.AddAttribute(XMLAddElement,'online','true'); END;
Step 3
In Codeunit 6181380 "MOB WMS Adhoc Registr."
Call the new function to set the name of the validation. Here we name it "'ValidateSerialNumber".
Step 4
In Codeunit 6181379 "MOB WMS Whse. Inquiry"
Enter your validation logic here to check Serial no. is correct.
Step 5
Create a new Mobile Document type with code "ValidateSerialNumber".
Add the "WMS" Mobile Group to this new Document type.
You should noew be able to use online validation.