Premium auditor lookup¶
This operation is a small but important helper: given an AD user ID, vendor number, and test-user indicator, it finds the matching premium auditor row and returns the full clsAuditor object.
| Field | Value |
|---|---|
| Operation ID | OP-EU-07 |
| Trigger | Caller needs the premium auditor associated with a user/vendor combination |
| Inputs | AD user ID, vendor number, test-user flag |
| Outputs | Retrieved clsAuditor object |
| Primary components | mdlAuditor.LoadAuditor |
| Entry point | Business\SAIF.Business.External.Users\mdlAuditor.vb |
Steps¶
- Query
PA_AUDITORfor the exact AD user and vendor-number combination. The helper bindsUserIDandVendorNumand executes the first scalar lookup (SQL-041, PA_AUDITOR). - Retry by vendor number only for test users. When the first query returns no auditor ID and the caller marked the account as a test user, the helper executes the vendor-only fallback query defined in the same lookup path (SQL-041, PA_AUDITOR).
- Hydrate the full auditor object from the resolved ID. The helper passes the selected auditor ID into
clsAuditor.GetAuditorByAuditorIDso callers receive the standard auditor business object.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Load auditor request]) --> Exact[Query by AD user ID and vendor]
Exact --> Found{Auditor found?}
Found -->|Yes| Load[Load full auditor object]
Found -->|No| Test{Test user?}
Test -->|Yes| Fallback[Query by vendor only]
Test -->|No| Load
Fallback --> Load
Load --> Done([Return auditor object])
Failure and edge-case behavior¶
- Non-test users do not get the vendor-only fallback path.
- When neither query finds an auditor ID, the downstream
clsAuditor.GetAuditorByAuditorIDcall determines what empty-object behavior the caller receives.
Related documentation¶
Sources¶
Business\SAIF.Business.External.Users\mdlAuditor.vbBusiness\SAIF.Business.External.Users\clsAuditor.vb