Skip to content

Look up the agent of record for a policy

This operation bypasses the normal BOF criteria classes and performs a direct scalar lookup to read the producer key stored on a policy row.

Field Value
Operation ID OP-010
Trigger A caller invokes clsProducer.GetAgent(inDataportal, inPolicyNum).
Inputs IDataPortalInfo, PolicyNum
Outputs Decimal agent number
Primary components clsProducer.GetAgent, RETRIEVE_OR_AGENT_SQL, data-portal request helpers
Entry point Business\SAIF.Business.Policy.Agency\clsProducer.vb

Steps

  1. Build a portal request directly from the supplied data portal context instead of instantiating a BOF business-object criteria class.
  2. Configure the request as a scalar text query using SQL-008 against POLICY.
  3. Bind :PolicyNum and execute the request through the data portal.
  4. Parse the scalar result into a decimal and return it to the caller (BR-017).

Process flow

The following diagram visualizes the direct scalar lookup.

flowchart TD
  Start([GetAgent]) --> Request[Build scalar portal request]
  Request --> SQL[Assign SQL-008]
  SQL --> Query[Query POLICY]
  Query --> Parse[Parse AGENT_NUM]
  Parse --> End([Agent number returned])

Failure and edge-case behavior

  • The operation runs outside the normal BOF business-object retrieve lifecycle.
  • The method depends on the scalar result being parseable as a decimal agent number.

Sources

  • Business\SAIF.Business.Policy.Agency\clsProducer.vb