---
title: "Sample Offline Application"
app: "Warehouse Insight"
section: "Developer"
last_updated: "2025-10-20"
url: "https://insight-works.com/kb/warehouse-insight/whi-sample-offline-application/"
---

# Sample Offline Application

This article will describe the process of building and consuming a simple offline application to capture inventory count information.

First, it is important to note that “Offline” applications are essentially a series of user prompts designed to gather information.

This information is stored/persisted on the device and sent to Business Central later for processing.

###

### Creating the Offline Application Header

Open the Offline Applications page in Business Central (search for Warehouse Insight Offline Applications).

1. Create a new Offline Application called “COUNT”
2. Give the application a suitable description
3. Specify an “_Event ID_” of: “2000000

   1. This is the event ID called when the data is sent to Business Central.
4. Set the “_Auto Close_” property to “After Send”

   1. This will close the application and bring the user back to the main screen after they hit Send
5. Set the “_Entry Mode_” to “Combined”

   1. The questions will be asked in a single combined dialog rather than individual prompts.
6. Set the “_Auto Send_” property to “No”

   1. Users must explicitly choose to send the entries when a viable connection has been established

![Offline Application](/wp-content/uploads/kb-legacy/whi-offline-application.png)

### Creating the Offline Application Fields

Create fields/questions for each of the data pieces that we will be collecting.

1. Create a field to prompt the user for the count sheet name:

   - _Name_: SheetName
   - _Caption_: Sheet Name
   - _Prompt_: Enter the Sheet Name
   - _Data Type_: String
   - _Required_: Yes
   - _Repeat Mode_: Repeat and Skip

      - Once the user enters a sheet name it will not be prompted for again
2. Create a field to prompt the user for the Bin code:

   - _Name_: BinCode
   - Caption: Bin
   - _Prompt_: Enter the Bin
   - _Data Type_: String
   - _Required_: Yes
   - _Repeat Mode_: Repeat and Show

      - This will persist the Bin between entries but allow the user to change
3. Create a field to prompt the user for the Item number:

   - _Name_: ItemNumber
   - _Caption_: Item
   - _Prompt_: Enter the Item
   - _Data Type_: String
   - _Required_: Yes
   - _Repeat Mode_: No Repeat
4. Create a field to prompt the user for the Quantity:

   - _Name_: Quantity
   - _Caption_: Quantity
   - _Prompt_: Enter the Quantity
   - _Data Type_: Decimal
   - Required: Yes
   - _Repeat Mode_: No Repeat
5. Create a field to prompt the user for the Unit of Measure

   - _Name_: UOM
   - _Caption_: Unit of Measure
   - _Prompt_: Choose the Unit of Measure
   - _Data Type_: Option
   - _Required_: Yes
   - Option Values: PCS,BOX
   - _Default Value_: PCS
   - _Repeat Mode_: No Repeat

![Fields](/wp-content/uploads/kb-legacy/whi-offline-application-fields.png)

###

### Creating the Main Menu Option

1. Open the _Device Menus_ page in Business Central (search for Warehouse Insight Device Menus).
2. Choose the “Main” form.
3. Create a new menu option and set the following properties:

   1. Caption: Offline Count
   2. Icon Code: COUNT
   3. Standard Action: Offline Application
   4. Offline Application: COUNT

![Main Menu](/wp-content/uploads/kb-legacy/whi-new-menu-option.png)

###

### Creating a Codeunit to Process the Entries

At it’s core the processing function must loop through the records based on event parameters matching this format: **entry\_%1\_%2**Where “%1” is the entry line number and “%2” is the field name.  The number of lines/entries is stored in the event parameter value ‘count’.An example of the processing function might look like this:![Entries](/wp-content/uploads/kb-legacy/whi-process-entries.png)

The extension codeunit used has also been attached to this article for reference. Download the [codeunit](/wp-content/uploads/kb-legacy/offline-count-extension-codeunit-1.zip).

###

### Using the Application

The Offline Application will appear on the handheld main screen listing, similar to this:![Warehouse Insight Application](/wp-content/uploads/kb-legacy/Warehouse-Insight-Application.png)

 Note: You must have established a connection to Business Central to download the offline application structure. Once downloaded, a connection is only required to send the entries.

Clicking on the module will lead to the entry screen where you will be able to add/delete/update entries and finally send them to Business Central.

![Offline Count](/wp-content/uploads/kb-legacy/Offline-Count.png)

Entering data (in a combined entry screen) will look like this:

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

 _Note: Subsequent entries will not prompt for the “Sheet Name” again as it was set to repeat mode.  The Bin Code will be shown but filled in with the last entered bin._

The created entries will be saved until they are sent to Business Central for processing. You may close/re-open the application as needed and the entries will remain.

![Offline Count](/wp-content/uploads/kb-legacy/Offline-Count-2.png)

Press **Send** when you are ready to update Business Central.

###

### View the Results in Business Central

Shown below is an example of the entries made after having sent to Business Central.

![Count Sheet](/wp-content/uploads/kb-legacy/whi-view-the-results.png)
