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

# clsApplicationCode

Owns one application-code lookup row used by menu pages.

## Purpose
- Persist the natural-key row in `BUSONLINE_APPS_CODE`.
- Expose the active flag and application path used by page definitions.

## Context
- Namespace: `SAIF.Business.Menu`
- Assembly/package: `SAIF.Business.Menu.dll`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Code | `Public Property Code() As String` | Natural key that identifies the application in `BUSONLINE_APPS_CODE`; used as the lookup key by `GetApplicationCode` and as the join key from `MENU_PAGE.APPLICATION_CODE`. |
| ApplicationPath | `Public Property ApplicationPath() As String` | Root path or virtual-directory value that a menu page's application maps to for navigation/link construction. |
| IsActive | `Public Property IsActive() As Boolean` | Determines whether the application code is returned by `GetActiveApplicationCodes` (inactive codes are excluded from the active-only lookup set). |
| IsValid | `Public Overrides ReadOnly Property IsValid() As Boolean` | Overrides `clsBusinessBase.IsValid`. `AddBusinessRules()` for this type contains only commented-out template placeholders, so no local Rules-engine field-level validation exists; the confirmed behavior is inherited from `clsBusinessBase`.* |
| IsDirty | `Public Overrides ReadOnly Property IsDirty() As Boolean` | Reports whether any of the row's own property values have changed since load, overriding the inherited `clsBusinessBase.IsDirty`. |
| Equals | `Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean` | Compares business-object identity using this type's key semantics. |
| Equals | `Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean` | Compares business-object identity using this type's key semantics. |
| Equals | `Public Overloads Function Equals(ByVal inObject As clsApplicationCode) As Boolean` | Compares business-object identity using this type's key semantics. |
| GetHashCode | `Public Overrides Function GetHashCode() As Integer` | Returns a hash based on the type's business identity semantics. |
| ToString | `Public Overrides Function ToString() As String` | Returns the type's string representation for diagnostics or UI binding. |
| NewApplicationCode | `Public Shared Function NewApplicationCode(ByVal inDataportal As IDataPortalInfo, ByVal inCode As String) As clsApplicationCode` | Creates a new typed object using the supplied data-portal context. |
| GetApplicationCode | `Public Shared Function GetApplicationCode(ByVal inDataportal As IDataPortalInfo, ByVal inCode As String) As clsApplicationCode` | Retrieves the single `BUSONLINE_APPS_CODE` row matching the natural key `inCode`, populating the application's `IsActive` flag and `ApplicationPath` for menu-page navigation lookups. |

## Behavioral notes
- Write operations use [BR-MENU-001](../../business-rules.md#br-menu-001-optimistic-contention-on-write).
- No local Rules-engine field validation was found for `Code`; treat any field-level requirement as unknown until verified.**

## Constraints and usage notes
- Natural-key lookup object.

## Inherited public members

No `dependency-resolution.json` was produced for this run, so the members below are a best-effort inference from typical SAIF BOF framework (`clsBusinessBase`) patterns observed elsewhere in this codebase, not a Legends CLI-sourced dependency lookup.**

### From clsBusinessBase (SAIF.BOF.Framework)**

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Save | `Public Overridable Function Save() As Boolean` | Routes the object through the inherited data-portal lifecycle (`BeforeInsert`/`AfterInsert` or `BeforeUpdate`/`AfterUpdate`) to persist it when dirty and valid.** | `clsBusinessBase` |
| Delete | `Public Overridable Sub Delete()` | Marks the object for deletion and, on `Save()`, routes it through `BeforeDelete`/`AfterDelete`.** | `clsBusinessBase` |
| AddErrorMessage | `Protected Sub AddErrorMessage(ByVal inKey As String, ByVal inMessage As String)` | Records a named validation/error message consulted by the inherited `IsValid` implementation and error-display UI.** | `clsBusinessBase` |
| MarkOld | `Protected Sub MarkOld()` | Clears the object's dirty flag after a successful load or save, resetting the inherited change-tracking baseline.** | `clsBusinessBase` |
| MarkNew | `Protected Sub MarkNew()` | Marks a freshly constructed object as new/dirty so `Save()` treats it as an insert candidate.** | `clsBusinessBase` |

> **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`
