---
title: "Designer Event Blocks"
app: "Warehouse Insight"
section: "How-to guides"
last_updated: "2024-07-22"
url: "https://insight-works.com/kb/warehouse-insight/designer-event-blocks/"
---

# Designer Event Blocks

The designer events are triggered either by actions taken by users (e.g., scanning barcodes, pressing menus, etc.) or by specific processes internal to the application framework (e.g., opening or closing an application, loading data, etc.). There should only be one instance of an event per application, and the instance should only be added to the application as needed.

The following table provides a summary of the available events. Select an event or scroll down to see more details about each event.

| **Event** | **Description** |
| --- | --- |
| After Item Reservation is Added | This event is triggered after an item tracking entry has been added via the _Show Reservations_ block. |
| After Item Reservation is Changed | This event is triggered after an item tracking entry has been modified via the _Show Reservations_ block. |
| After Item Reservation is Deleted | This event is triggered after an item tracking entry has been deleted via the _Show Reservations_ block. |
| Custom Event | This event can be triggered in multiple ways and is used to execute custom processes. |
| When a Bin is Scanned | This event is triggered when a bin barcode is scanned. |
| When a Document is Scanned | This event is triggered when a document barcode is scanned. |
| When a License Plate is Scanned | This event is triggered when a license plate barcode is scanned. |
| When a License Plate is Started | This event is triggered when a license plate is started. |
| When a License Plate is Stopped | This event is triggered when a license plate is stopped. |
| When a License Plate Template is Scanned | This event is triggered when a license plate template barcode is scanned. |
| When a Location is Scanned | This event is triggered when a location barcode is scanned. |
| When a Tag is Scanned | This event is triggered when a tag barcode is scanned. |
| When an Item is Scanned | This event is triggered when an item barcode is scanned. |
| When Loading Document Data | This event is triggered automatically after the _When the Form Opens_ event or by the _Update Data_ block, and presents a Data Grid or Card Panel to the user. |
| When a Package is Scanned | This event is triggered when a package barcode is scanned. |
| When Quantity Should Change on a Row | This event is triggered when a menu option with the _Change Qty._ standard action is selected. |
| When Text is Scanned | This event is triggered when a text barcode is scanned. |
| When the Form Closes | This event is triggered just prior to the application closing. |
| When the Form Opens | This event is triggered when the application first loads. |

The following sections outline each available event and provide a brief example of how the event can be used.

### After Item Reservation is Added

This event is triggered after an Item tracking entry has been added via the Show Reservations block.

![Item Reservation](/wp-content/uploads/kb-legacy/Item-Reservation.png)

When triggered the following variables are available to the user:

- **form.PackageNumber**: The package number entered by the user
- **VariantCode**: The variant code of the originating line.
- **LotNumber**: The lot number entered by the user.
- **SerialNumber**: The serial number entered by the user.
- **QuantityUserUOM**: The quantity entered by the user.
- **TotalQuantityLineUOM**: The new combined quantity based on line UOM. This is the original line quantity to handle plus the quantity entered by the user.
- **QuantityLineUOM**: The quantity entered by the user but converted to the line UOM if different than the one entered by the user.
- **UnitOfMeasure**: The unit of measure entered by the user.
- **NumberOfLabels**: The number of labels requested (if applicable).
- **ExpiryDate**: The expiry date entered by the user.

#### After Item Reservation is Added Example

The following blocks from Application Designer illustrate an example of using the _After Item Reservation is Added_ event:

![Application Designer](/wp-content/uploads/kb-legacy/Application-Designer.png)

### After Item Reservation is Changed

This event is triggered after an item tracking entry has been modified via the Show Reservations block.

![IR Changed](/wp-content/uploads/kb-legacy/IR-Changed.png)

When triggered the following variables is available to the user:

- **form.PackageNumber**: The package number entered by the user.
- **VariantCode**: The variant code of the originating line.
- **LotNumber**: The lot number modified by the user.
- **SerialNumber**: The serial number modified by the user.
- **QuantityUserUOM**: The quantity entered by the user.
- **TotalQuantityLineUOM**: The new combined quantity based on line UOM. This is the original line quantity to handle plus the quantity entered by the user minus the item tracking quantity before modification.
- **QuantityLineUOM**: The quantity entered by the user but converted to the line UOM if different than the one entered by the user.
- **UnitOfMeasure**: The unit of measure entered by the user.
- **NumberOfLabels**: The number of labels requested (if applicable).
- **ExpiryDate**: The expiry date entered by the user.

#### After Item Reservation is Changed Example

The following Application Designer blocks illustrate an example of using After Item Reservation is Changed event:

![Application Designer](/wp-content/uploads/kb-legacy/Application-Designer-2.png)

### After Item Reservation is Deleted

This event is triggered after an Item tracking entry has been deleted via the Show Reservations block.

![Item Reservation Deleted](/wp-content/uploads/kb-legacy/IR-Deleted.png)

When triggered the following variables is available to the user:

- **form.PackageNumber**: The package number of the item tracking entry.
- **VariantCode**: The variant code of the originating line.
- **LotNumber**: The lot number deleted by the user.
- **SerialNumber**: The serial number deleted by the user.
- **TotalQuantityLineUOM**: The new combined quantity based on line UOM. This is the original line quantity to handle – the item tracking quantity being deleted.
- **QuantityLineUOM**: The negative quantity of the item tracking quantity being deleted but converted to line UOM.
- **UnitOfMeasure**: The unit of measure of the originating line.
- **ExpiryDate**: The expiry date of the item tracking entry.

#### After Item Reservation is Deleted Example

The following Application Designer blocks illustrate an example of using the _After Item Reservation is Deleted_ event:

![Item Reservation Deleted Example](/wp-content/uploads/kb-legacy/IR-Deleted-2.png)

### Custom Event

The custom event block is triggered by one of two ways:

- A Device Menu with a “Custom Application Event” standard action of; the event to trigger is specified in the Event Name property on the menu.
- Using a Start Event block.

You can use this block to tie menu actions to custom processes and make the application design more readable and re-usable.

![Custom Event Name](/wp-content/uploads/kb-legacy/Custom-Event-Name.png)

Block Configuration:

| Option | Description |
| --- | --- |
| Name | The name of the event and is referenced in the Custom Application Event property on a device menu or the Event Name option on the “Start Event” block. |

#### Custom Event Example

The following Application Designer blocks illustrate an example of using Custom Event:

![Custom Event](/wp-content/uploads/kb-legacy/Custom-Event.png)

### When a Bin is Scanned

This event is triggered when a bin barcode is scanned. This event is fired after the barcode has been validated by Business Central (if required). You need to handle the actions to take (if any) when a bin is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the bin barcode variables into the page context and then take appropriate action from there.

![Bin Scanned](/wp-content/uploads/kb-legacy/Bin-is-Scanned.png)

#### When a Bin is Scanned Example

The following Application Designer blocks illustrate an example of using When a Bin is Scanned:

![Scanned Bin](/wp-content/uploads/kb-legacy/Scanned-Bin.png)

### When a Document is Scanned

This event is triggered when a document barcode is scanned. Document barcode formats are fixed and are always preceded by a unique type identifier. If you are intending to scan a document that does not have the identifiers present then it needs to be interpreted as a Text barcode.

You need to handle the actions to take (if any) when a document is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the document barcode variables into the page context and then take appropriate action from there.

![Document Scanned](/wp-content/uploads/kb-legacy/Document-Scanned.png)

#### When a Document is Scanned Example

The following Application Designer blocks illustrate an example of using When a Document is Scanned:

![Scanned Document](/wp-content/uploads/kb-legacy/Scanned-Document.png)

### When a License Plate is Scanned

This event is triggered when a license plate barcode is scanned. This event is fired after the barcode has been validated by Business Central. You need to handle the actions to take (if any) when a license plate is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the license plate barcode variables into the page context and then take appropriate action from there.

![License Plate Scanned](/wp-content/uploads/kb-legacy/License-Plate-Scanned.png)

#### When a License Plate is Scanned Example

The following Application Designer blocks illustrate an example of using When a License Plate is Scanned:

![Scanned License Plate](/wp-content/uploads/kb-legacy/Scanned-License-Plate.png)

### When a License Plate is Started

This event is triggered when a PDA menu with a standard action of LP Create is pressed. The application internally keeps track of the menu state and toggle it between start and stop, so depending on what state the menu is in this or the When a License Plate is, Stopped event triggers.

![License Plate Started](/wp-content/uploads/kb-legacy/License-Plate-Started.png)

You need to handle the actions to take (if any) when the request is made.

#### When a License Plate is Started Example

The following Application Designer blocks illustrate an example of using When a License Plate is Started:

![Started License Plate](/wp-content/uploads/kb-legacy/Started-License-Plate.png)

### When a License Plate is Stopped

This event is triggered when a PDA menu with a standard action of LP Create is pressed. The application internally keeps track of the menu state and toggle it between start and stop so depending on what state the menu is in this or the When a License Plate is Started event triggers.

![License Plate Stopped](/wp-content/uploads/kb-legacy/License-Plate-Stopped.png)

You need to handle the actions to take (if any) when the request is made.

#### When a License Plate is Stopped Example

The following Application Designer blocks illustrate an example of using When a License Plate is Stopped:

![Stopped License Plate](/wp-content/uploads/kb-legacy/Stopped-License-Plate.png)

### When a License Plate Template is Scanned

This event is triggered when a License Plate Template barcode is scanned. You need to handle the actions to take (if any) when a License Plate Template is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the License Plate Template barcode variables into the page context and then take appropriate action from there.

![License Plate Template Scanned](/wp-content/uploads/kb-legacy/License-Plate-Template-Scanned.png)

#### When a License Plate Template is Scanned Example

The following Application Designer blocks illustrate an example of using When a License Plate is Scanned:

![Scanned License Plate Template](/wp-content/uploads/kb-legacy/Scanned-Licnese-Plate-Template.png)

### When a Location is Scanned

This event is triggered when a Location barcode is scanned. This event fires after the barcode has been validated by Business Central. You need to handle the actions to take (if any) when a location is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the location barcode variables into the page context and then take appropriate action from there.

![Location Scanned](/wp-content/uploads/kb-legacy/Location-Scanned.png)

### When a Location is Scanned Example

The following Application Designer blocks illustrate an example of using the event:

![Scanned Location](/wp-content/uploads/kb-legacy/Scanned-Location.png)

### When a Tag is Scanned

This event is triggered when a tag barcode is scanned. You need to handle the actions to take (if any) when a tag is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the Tag barcode variables into the page context and then take appropriate action from there.

![Tag Scanned](/wp-content/uploads/kb-legacy/Tag-Scanned.png)

#### When a Tag is Scanned Example

The following Application Designer blocks illustrate an example of using When a Tag is Scanned:

![Scanned Tag](/wp-content/uploads/kb-legacy/Scanned-Tag.png)

### When an Item is Scanned

This event is triggered when an item barcode is scanned. This event fires after the barcode has been decoded/processed in Business Central. You need to handle the actions to take (if any) when an item is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the item barcode variables into the page context and then take appropriate action from there.

![Item Scanned](/wp-content/uploads/kb-legacy/Item-Scanned.png)

This event is integrated with the scan quantity change scan behaviors defined in Business Central.

 Note: For more information in item decoding, reference the Warehouse Insight documentation or contact support.

#### When an Item is Scanned Example

The following Application Designer blocks illustrate an example of using the When an Item is Scanned:

![Scanned Item](/wp-content/uploads/kb-legacy/Scanned-Item.png)

 Note: For more information on Scan Behaviors, reference the Warehouse Insight documentation.

### When Loading Document Data

If this block is added, the application presents a Data Grid or Card Panel to the user. This block triggers after the When the Form Opens. In addition, the event can be triggered by an Update Data… block. The only action required in this event is to get the dataset from Business Central so that the grid can be populated.

![Loading Document Data](/wp-content/uploads/kb-legacy/Loading-Document-Data.png)

#### When Loading Document Data Example

The following Application Designer blocks illustrate an example of using When Loading Document Data:

![Document Data Loading](/wp-content/uploads/kb-legacy/Document-Data-Loading.png)

 Note: See the Update Data block for an example of how to return data to the handheld.

### When a Package is Scanned

This event is triggered when you scan a Package barcode. You need to handle the actions to take (if any) when a Package is scanned. Typically, you include a Using the Last Scanned Barcode block to push the Package barcode variables into the page context and then take appropriate action from there.

![Document Data Loading](/wp-content/uploads/kb-legacy/whi-when-a-package-is-scanned1.png)

#### When a Package is Scanned Example

The following Application Designer blocks illustrate an example of using When a Package is Scanned:

![Document Data Loading](/wp-content/uploads/kb-legacy/whi-when-a-package-is-scanned2.png)

### When Quantity Should Change on a Row

This event is only triggered when a menu option with a standard action of Change Qty is pressed. This event is meant for manual quantity changes for a selected line and is integrated with the manual quantity change scan behaviors defined in Business Central.

![Quantity Change](/wp-content/uploads/kb-legacy/Quantity-Change.png)

#### When Quantity Should Change on a Row Example

The following Application Designer blocks illustrate an example of using When Quantity Should Change on a Row:

![Row Quantity Change](/wp-content/uploads/kb-legacy/Row-Quantity-Change.png)

 Note: For more information on Scan Behaviors, reference Warehouse Insight documentation.

### When Text is Scanned

This event is triggered when a text barcode is scanned. A text barcode is not decodable as anything else (e.g., Item, Bin, LP, document, etc.). The process flow attempts to decode the text barcode as an item or bin. If those fail, this event is raised.

You need to handle the actions to take (if any) when a text barcode is scanned. Typically, you would include a Using the Last Scanned Barcode block to push the text barcode variables into the page context and then take appropriate action from there.

![Text Scanned](/wp-content/uploads/kb-legacy/Text-Scanned.png)

 Note: If this block is not present, an error displays indicating that the barcode could not be decoded as a valid item barcode.

#### When Text is Scanned Example

The following Application Designer blocks illustrate an example of using When Text is Scanned:

![Scanned Text](/wp-content/uploads/kb-legacy/Scanned-Text.png)

### When The Form Closes

This event is triggered just prior to the application closing. You may take additional action at this point (e.g., posting, printing, etc.) but you are unable to prevent the page from being closed.

![Form Closes](/wp-content/uploads/kb-legacy/Form-Closes.png)

#### When The Form Closes Example

The following Application Designer blocks illustrate an example of using When the Form Closes:

![Form Closes](/wp-content/uploads/kb-legacy/Form-Closes-2.png)

### When The Form Opens

The When the Form Opens event is triggered when the application first loads. The event is only ever fired once and is used to initialize the application (e.g., setting the form title, initializing variables, etc.). For simple processes (e.g., asking users for input and then closing the form), this event is considered the starting point.

![Form Opens](/wp-content/uploads/kb-legacy/Form-Opens.png)

#### When The Form Opens Example

The following Application Designer blocks illustrate an example of using When the Form Opens:

![Form Opens](/wp-content/uploads/kb-legacy/Form-Opens-2.png)
