Sample Quantity Dialog Extensions

Sample Quantity Dialog Extensions

You are here:

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

Creating the Quantity Extension Header

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)
Quantity Extension

Creating the Quantity Extension 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
Quantity Extension Fields

Associating the Extension to an Application

  • Open the Scan Behaviors page in Business Central (search for Warehouse Insight Scan Behaviors).
  • Specify the “QA_INSPECTION” for the “WHSE_RECEIPT_DOC” scan behavior.
Warehouse Insight Scan Behaviors

Create a Codeunit to Process the Default and Validation Events

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:
Validate MFG Date
The extension codeunit used has also been attached to this article for reference.

Testing the Quantity Extension

When the quantity dialog is displayed on the device you should see the additional three controls, like so:

Quantity Dialog
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.
Was this article helpful?
2.5 out Of 5 Stars

1 rating

5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 100%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Go to Top