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¶
- Build a portal request directly from the supplied data portal context instead of instantiating a BOF business-object criteria class.
- Configure the request as a scalar text query using SQL-008 against POLICY.
- Bind
:PolicyNumand execute the request through the data portal. - 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.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Agency\clsProducer.vb