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

# clsMenuFavorite

Represents one user's favorited menu item (`MENU_FAVORITE`) with a display order and an optional inactive date; favorited rows are folded into the authorization projection as a third branch alongside group-granted and unsecured items ([BR-MENU-005](../../business-rules.md#br-menu-005-favorites-appear-in-the-authorized-set)).

## Purpose
- Owns the identity, ordering, and soft-deactivation state of one user's favorite, persisted to [MENU_FAVORITE](../../database-tables.md#menu_favorite).
- Excludes retired favorites from the authorized/favorite set once `ItemInactiveDate` is set ([BR-MENU-006](../../business-rules.md#br-menu-006-inactive-favorites-excluded)).
- Lazily loads the favorited `clsMenuItem` on first access ([BR-MENU-024](../../business-rules.md#br-menu-024-lazy-loaded-navigation-properties)).

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| MenuFavoriteSeqNum | `Property MenuFavoriteSeqNum As Decimal` | Server-assigned surrogate key from the `MENU_FAVORITE_SEQ` sequence ([BR-MENU-014](../../business-rules.md#br-menu-014-sequence-assigned-identity)). |
| UserID | `Property UserID As String` | The account whose favorite this is. |
| UserEmplID | `Property UserEmplID As String` | Employee ID carried alongside the favorite. |
| MenuItemSeqNum | `Property MenuItemSeqNum As Decimal` | Foreign key to the favorited `clsMenuItem`. |
| MenuItem | `ReadOnly Property MenuItem As clsMenuItem` | Lazily loads the favorited item on first access ([BR-MENU-024](../../business-rules.md#br-menu-024-lazy-loaded-navigation-properties)). |
| MenuOrder | `Property MenuOrder As Decimal` | The favorite's display order, carried through to the authorization projection's favorite rows ([BR-MENU-005](../../business-rules.md#br-menu-005-favorites-appear-in-the-authorized-set)). |
| ItemInactiveDate | `Property ItemInactiveDate As Date?` | Soft-deactivation date; when set, the favorite is excluded from the authorized-item favorites branch ([BR-MENU-006](../../business-rules.md#br-menu-006-inactive-favorites-excluded)) but not from `GetMenuFavoritesForUser` itself*. |
| FavoritePageName | `ReadOnly Property FavoritePageName As String` | Effective label for this favorite, falling back to the page's own name when unset ([BR-MENU-023](../../business-rules.md#br-menu-023-favorite-name-fallback)). |
| NewMenuFavorite | `Shared Function NewMenuFavorite(dpi As IDataPortalInfo) As clsMenuFavorite` | Factory that creates a new favorite ready for `Save`; the key is server-assigned on insert ([BR-MENU-014](../../business-rules.md#br-menu-014-sequence-assigned-identity)). |
| GetMenuFavorite | `Shared Function GetMenuFavorite(dpi As IDataPortalInfo, menuFavoriteSeqNum As Decimal) As clsMenuFavorite` | Factory that retrieves one favorite by its key ([SQL-019](../../sql/SQL-019-retrieve-menu-favorite-by-seq.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-022](../../business-rules.md#br-menu-022-delete-returns-object-to-new-state)). |

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

## 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 `†` were retrieved from dependency library documentation via the Legends CLI RAG service. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.

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