How-to: Modify Package Number step
Minimum Requirements
- Extension version MOB5.39
- Android App version 1.8.0
- Business Central BC18 (or newer)
Description
Modify Package Number step in Planned functions.
- Before you continue, please read: Case: Create a custom implementation for Package Numbers
Use case
- The user wishes to modify the Package Number step, for example by changing its defaultValue.
Behaviour on the device
The Package Number step behaves a bit different from the other steps for Planned functions as it cannot be modified in the application.cfg. Instead, eventsubscribers are needed.
Example 1: Changing defaultValue and validationValues for the Package Number step in Pick
// [Example 01]: 'Blank' defaultValue and validationValues to avoid a block when registering a different Package Number than registered before in the same line.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyLine', '', true, true)]
local procedure MyOnGetPickOrderLines_OnAddStepsToAnyLine(_RecRef: RecordRef; var _BaseOrderLineElement: Record "MOB Ns BaseDataModel Element"; var _Steps: Record "MOB Steps Element")
begin
_Steps.SetRange(name, 'PackageNumber');
if _Steps.FindFirst() then begin
_Steps.Set_defaultValue('');
_Steps.Set_validationValues('');
_Steps.Save();
end;
end;
XML Response example after change
XML Response example
<?xml version="1.0" encoding="UTF-8"?> <response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="C976B9DA-49A6-4D2C-B989-F35C79FCE7A0" status="Completed"> <description /> <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel"> <registrationCollectorConfiguration xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response"> ... <Workflow><![CDATA[<registrationCollectorConfiguration tweak="Append"> <steps> <add inputType="Text" id="37" name="PackageNumber" autoForwardAfterScan="true" header="Scan Package No." visible="true" eanAi="92" editable="true" helpLabelMaximize="false" label="Package No.:" labelWidth="100" length="50" optional="false" overDeliveryValidation="Warn" performCalculation="false" primaryInputMethod="Scan" validationCaseSensitive="false" /> </steps> </registrationCollectorConfiguration>]]></Workflow> </BaseOrderLine> </responseData> </response>
To modify the step in other planned Functions, see also:
-
OnGetShipOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
OnGetReceiveOrderLines_OnAddStepsToAnyLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetReceiveOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
OnGetPutAwayOrderLines_OnAddStepsToWarehouseActivityLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetPutAwayOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
OnGetPickOrderLines_OnAddStepsToAnyLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetPickOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
OnGetPhysInvtRecordingLines_OnAddStepsToPhysInvtRecordLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetMoveOrderLines_OnAddStepsToWarehouseActivityLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetMoveOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
OnGetCountOrderLines_OnAddStepsToAnyLine — Add steps to be displayed at the mobile device when collecting values for each individual document line.
-
OnGetCountOrderLines_OnAddStepsTo... — Add steps to order posting ("Header Steps") or Registrations ("Line Steps").
-
How-to: Online Validation for Line step — Online Validation on Steps can instantly validate the user data, with a call to BC.
-
-
Case: Use your own custom Item Barcode table — A customer wishes to start using there own Item Barcode table when scanning Items on the mobile device.