---
title: clsApplicationCode
summary: API reference for clsApplicationCode.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# clsApplicationCode

Represents one registered application entry (`BUSONLINE_APPS_CODE`) that maps a caller-supplied code to a virtual-directory path and an active/inactive flag; `clsMenuPage.Application` and menu-path resolution ([BR-MENU-012](../../business-rules.md#br-menu-012-application-resolution-by-virtual-path)) both depend on this mapping to determine which web application owns a given page.

## Purpose
- Owns the identity and active/inactive state of one registered application code, persisted to [BUSONLINE_APPS_CODE](../../database-tables.md#busonline_apps_code).
- Supplies the `ApplicationPath` value that [BR-MENU-012](../../business-rules.md#br-menu-012-application-resolution-by-virtual-path) matches against an incoming request path to resolve the owning application.
- Enforces [BR-MENU-015](../../business-rules.md#br-menu-015-natural-key-creation-for-codes) — the `Code` key is supplied by the caller rather than sequence-generated.

## Context
- Namespace: `SAIF.Business.Menu`
- Assembly/package: `SAIF.Business.Menu` (`SAIF.BOF.Presentation.Web.Infragistics111` NuGet package)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Code | `Property Code As String` | The caller-supplied natural key identifying this application ([BR-MENU-015](../../business-rules.md#br-menu-015-natural-key-creation-for-codes)); maps to `CODE`. |
| Description | `Property Description As String` | Display description of the application; maps to `CODE_DESCR`. Not persisted on insert due to a parameter/column-position defect in [SQL-005](../../sql/SQL-005-insert-application-code.md)*. |
| ApplicationPath | `Property ApplicationPath As String` | The registered virtual-directory path matched against the current request path to resolve the owning application ([BR-MENU-012](../../business-rules.md#br-menu-012-application-resolution-by-virtual-path)). |
| IsActive | `Property IsActive As Boolean` | Active/inactive flag, persisted as `Y`/`N` ([BR-MENU-019](../../business-rules.md#br-menu-019-yn-boolean-flag-storage)); only active applications are returned by `GetActiveApplicationCodes` ([BR-MENU-013](../../business-rules.md#br-menu-013-active-only-application-filtering)). |
| NewApplicationCode | `Shared Function NewApplicationCode(dpi As IDataPortalInfo) As clsApplicationCode` | Factory that creates a new, caller-keyed application code ready for `Save` ([BR-MENU-015](../../business-rules.md#br-menu-015-natural-key-creation-for-codes)). |
| GetApplicationCode | `Shared Function GetApplicationCode(dpi As IDataPortalInfo, code As String) As clsApplicationCode` | Factory that retrieves one application code by its key ([SQL-012](../../sql/SQL-012-retrieve-application-code-by-code.md)). |
| Save | `Sub Save()` | Persists the object via insert or update depending on new/dirty state ([BR-MENU-016](../../business-rules.md#br-menu-016-audit-stamp-on-insert-and-update), [BR-MENU-018](../../business-rules.md#br-menu-018-save-only-when-dirty)). |
| Delete | `Sub Delete()` | Removes the row and returns the object to a new, unsaved state ([BR-MENU-020](../../business-rules.md#br-menu-020-single-row-write-verification)). |

## Inherited public members

Members in this section are inherited from `clsBusinessBase` in `SAIF.Framework.Core` (delivered by the `SAIF.BOF.Framework` package). They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Rules | `ReadOnly Property Rules As clsRulesManager` | Exposes the object's rule manager, used to register and evaluate validation rules.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| BeginEdit | `Sub BeginEdit()` | Begins an editable transaction on the object, snapshotting current state for a later cancel.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| CancelEdit | `Sub CancelEdit()` | Reverts the object to the state captured by the most recent `BeginEdit`.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| ApplyEdit | `Sub ApplyEdit()` | Commits the in-progress edit, discarding the `BeginEdit` snapshot.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| SetPreviousLink | `Sub SetPreviousLink(item As ILinkItem)` | Sets the previous node in a doubly linked list of business objects.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| SetNextLink | `Sub SetNextLink(item As ILinkItem)` | Sets the next node in a doubly linked list of business objects.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| InsertLinkAfter | `Sub InsertLinkAfter(item As ILinkItem)` | Inserts the given item immediately after this object in a linked sequence.† | `SAIF.Framework.Core` — `clsBusinessBase` |

## Behavioral notes
- `Description` is a documented property but the insert statement ([SQL-005](../../sql/SQL-005-insert-application-code.md)) binds only three of its four parameters to the three target columns, so a newly created application code's description is never actually written to `CODE_DESCR`*.

## Constraints and usage notes
- `Code` must be unique and is never auto-generated; callers are responsible for choosing a value that does not collide with an existing row.

## Related documentation
- [Index](../../index.md)
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Operations and processes](../../operations-processes.md)
- [Business rules](../../business-rules.md)
- [Database tables](../../database-tables.md)
- [API reference](../index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Business.Menu/clsApplicationCode.vb
