---
title: clsAgencyOffice
summary: API reference for clsAgencyOffice.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Agency
reference_type: package
---

# clsAgencyOffice

`clsAgencyOffice` is the read-only office/location view over `AGENT`. It applies the agency-office predicate, exposes date and exclusion helpers, and gives callers a typed representation of location rows related to an agency.

## Purpose
- Represent one office or location row that belongs to an agency.
- Apply active-date and exclusion checks to office rows.
- Support keyed office retrieval and identity comparisons.

## Context
- Namespace: `SAIF.Business.Policy.Agency`
- Assembly/package: `SAIF.Business.Policy.Agency`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `AgencyOfficeNumber` | `Public ReadOnly Property AgencyOfficeNumber() As Decimal` | Exposes the office identity key sourced from `AGENT_NUM`. |
| `AgencySeqNum` | `Public ReadOnly Property AgencySeqNum() As Decimal` | Identifies the owning agency for the office row. |
| `CreateDate` | `Public ReadOnly Property CreateDate() As Date` | Returns the date the office record was created, for audit history. |
| `CreateUser` | `Public ReadOnly Property CreateUser() As String` | Returns the user ID that created the office record, for audit history. |
| `EffectiveDate` | `Public ReadOnly Property EffectiveDate() As Date` | Returns the date the office appointment became effective, used by `IsActive`. |
| `ExpirationDate` | `Public ReadOnly Property ExpirationDate() As Date` | Returns the date the office appointment expires, used by `IsActive`/`IsExpired`. |
| `InterfaceDate` | `Public ReadOnly Property InterfaceDate() As Date` | Returns the date the office row was last interfaced from the source system. |
| `IsActive` | `Public ReadOnly Property IsActive(ByVal inDate As Date) As Boolean` | Applies the effective/expiration-window test to the office. |
| `IsExcludedFromServiceCenter` | `Public ReadOnly Property IsExcludedFromServiceCenter() As Boolean` | Exposes the service-center exclusion flag in Boolean form. |
| `IsExpired` | `Public ReadOnly Property IsExpired() As Boolean` | Reports whether the office row is already expired. |
| `MailAddressLocationSeqNum` | `Public ReadOnly Property MailAddressLocationSeqNum() As Decimal` | Returns the address-location sequence number where mail is sent for this office. |
| `Name` | `Public ReadOnly Property Name() As String` | Returns the office display name from the underlying agent row. |
| `UpdateDate` | `Public ReadOnly Property UpdateDate() As Date` | Returns the date the office record was last updated, for audit history. |
| `UpdateUser` | `Public ReadOnly Property UpdateUser() As String` | Returns the user ID that last updated the office record, for audit history. |
| `IsAgentEffDateNull` | `Public Function IsAgentEffDateNull() As Boolean` | Reports whether the office has no recorded effective date. |
| `IsAgentExpDateNull` | `Public Function IsAgentExpDateNull() As Boolean` | Reports whether the office has no recorded expiration date. |
| `IsCreateDateNull` | `Public Function IsCreateDateNull() As Boolean` | Reports whether `CreateDate` has no assigned value. |
| `IsInterfaceDateNull` | `Public Function IsInterfaceDateNull() As Boolean` | Reports whether `InterfaceDate` has no assigned value. |
| `IsMailAddrLocSeqNumNull` | `Public Function IsMailAddrLocSeqNumNull() As Boolean` | Reports whether `MailAddressLocationSeqNum` has no assigned value. |
| `IsUpdateDateNull` | `Public Function IsUpdateDateNull() As Boolean` | Reports whether `UpdateDate` has no assigned value. |
| `IsUpdateUserNull` | `Public Function IsUpdateUserNull() As Boolean` | Reports whether `UpdateUser` has no assigned value. |
| `GetAgencyOffice` | `Public Shared Function GetAgencyOffice(ByVal inDataportal As IDataPortalInfo, ByVal inAgencyOfficeNumber As Decimal) As clsAgencyOffice` | Entry point for keyed BOF retrieval of one office. |
| `Equals` (shared) | `Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean` | Compares two objects for office-identity equality when both are `clsAgencyOffice` instances. |
| `Equals` (override) | `Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean` | Compares this office to another object by delegating to the identity-based `Equals(clsAgencyOffice)` overload. |
| `Equals` | `Public Overloads Function Equals(ByVal inObject As clsAgencyOffice) As Boolean` | Compares offices by their business identity key. |
| `GetHashCode` | `Public Overrides Function GetHashCode() As Integer` | Returns a hash code derived from the office number, for use in hash-based collections. |
| `ToString` | `Public Overrides Function ToString() As String` | Returns the office number as a string, used for display and lookups. |

## Inherited public members

Members in this section are inherited from `clsBusinessBase` in `SAIF.Framework.Core`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `Rules` | `Property Rules As clsRulesManager` | Exposes the BOF validation surface used for office-number validation.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `BeginEdit` | `Sub BeginEdit()` | Opens a BOF edit scope.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `CancelEdit` | `Sub CancelEdit()` | Rolls back a BOF edit scope.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `ApplyEdit` | `Sub ApplyEdit()` | Commits a BOF edit scope.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `SetPreviousLink` | `Sub SetPreviousLink(item As ILinkItem)` | Establishes a backward link to another business object for linked-list traversal scenarios.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `SetNextLink` | `Sub SetNextLink(item As ILinkItem)` | Establishes a forward link to another business object for linked-list traversal scenarios.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `InsertLinkAfter` | `Sub InsertLinkAfter(item As ILinkItem)` | Inserts a linked item immediately after this office in the linked chain.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `InsertLinkBefore` | `Sub InsertLinkBefore(item As ILinkItem)` | Inserts a linked item immediately before this office in the linked chain.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `RemoveLinks` | `Sub RemoveLinks()` | Detaches this office from its linked neighbors, repairing the remaining chain.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `Error` | `ReadOnly Property Error As String` (via `IDataErrorInfo`) | Returns a summary validation-error message for the office, sourced from broken-rule state.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `Item(columnName)` | `ReadOnly Property Item(columnName As String) As String` (via `IDataErrorInfo`) | Returns a per-property validation-error message for the office.* | `SAIF.Framework.Core` — `clsBusinessBase` |
| `AllowCache` | `Public Property AllowCache() As Boolean` | Controls whether the BOF runtime may cache the office object.* | `SAIF.Framework.Core` — `clsUndoableBase` |
| `DumpState` | `Public Sub DumpState()` | Writes the office object's field data to the debugger output window, for diagnostic use.* | `SAIF.Framework.Core` — `clsUndoableBase` |

## Behavioral notes
- Office retrieval uses a stricter `AGENT` predicate than producer retrieval, excluding LOV-excluded rows and non-location rows.
- The type carries no persistence behavior; it is a retrieve-only BOF business object.

## Constraints and usage notes
- The office number is mandatory for a valid keyed office object.

> **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
- `Business\SAIF.Business.Policy.Agency\clsAgencyOffice.vb`
