This article will describe the process of extending the Quantity dialog in Warehouse Insight to capture additional information.
In this solution below we will be creating an Quantity Extension to capture three additional pieces of information during the Receiving process:
- Date of Manufacture
- Vendor Lot Number
- QA Inspection Result
Open the Quantity Extensions page in Business Central (search for Warehouse Insight Quantity Extensions).
- Create a new Quantity Extension called “QA_INSPECTION”
- Give the extension a suitable description
- Set the “New Page” value to “No”
- This will add the additional fields to the quantity dialog. Setting to “Yes” will prompt the user for values in a separate dialog after the quantity dialog closes.
- Leave the “Page Title” blank (only required if using a new page for the additional fields)
Create fields/questions for each of the data pieces that we will be collecting.
- Create a field to prompt the user for the Date of Manufacture
- Field Name: DateOfMfg
- Field Caption: Date of Manufacture
- Data Type: Date
- Validation Event ID: 2000000
- Create a field to prompt the user for the Vendor Lot Number
- Field Name: VendorLotNo
- Field Caption: Vendor Lot No.
- Data Type: String
- Create a field to prompt the user for the Inspection Result
- Field Name: InspectionResult
- Field Caption: Inspection Result
- Data Type: Option
- Default Event ID: 2000001
Default Value event handlers must return a standard value result. Option values are a comma-separated list, where the first item in the list is the selected value.
Validation events handlers send the fields value in the field name key of the Event Params record.
An example of the required functions are:
The extension codeunit used has also been attached to this article for reference.
When the quantity dialog is displayed on the device you should see the additional three controls, like so:
Validations will fire when the value is changed and when the “OK” button is pressed to close the dialog.
All additional fields will be sent to the processing event as per normal for further handling.