Search Results contact_role_exists




Overview

ARP_CROL_PKG is a PL/SQL package in the Oracle E-Business Suite Receivables (AR) module that manages contact role records associated with customers and customer contacts. In Oracle EBS, contact roles identify the function a particular contact performs relative to a customer account or site — for example, billing contact, primary contact, or shipping contact. The ARP_CROL_PKG package encapsulates the database operations required to validate, insert, update, and delete rows in the contact role entity, presenting a programmatic interface that shields callers from the underlying table structure.

The package body carries the header identifier AROCROLB.pls and shows a revision stamp of 120.1 dated 2005/08/11, indicating its lineage spans multiple EBS releases including 12.1.1 and 12.2.2. The module was originally authored by Kevin Hudson. Consistent with many seed packages shipped in the AR schema, several of the validation routines are stubbed in the shipped source, with the substantive logic either implemented at a later customization point or superseded by other validation layers in the application.

Key Procedures and Functions

  • check_unique — Documented to raise an error when a contact role is not unique. It accepts the contact role identifier, contact identifier, and usage code as inputs and returns no value. The shipped body is a no-op (NULL).
  • check_primary — Enforces the business rule that a contact may only have one primary role. It receives the contact role identifier and contact identifier as input arguments and returns no value. This is the routine referenced by the "check_primary" search term. The shipped body is likewise a stub returning NULL.
  • contact_role_exists — A Boolean function that determines whether a contact role exists for a given contact and usage code. It returns TRUE if the role exists and FALSE otherwise.
  • Insert_Row — The canonical insert routine for the contact role entity, populating identifiers, audit columns such as last update date and last updated by, and the remaining contact role attributes.
  • Lock_Row — Acquires a row-level lock for concurrency control, typically invoked before an update to prevent lost updates in multi-user environments.
  • Update_Row — Applies modifications to an existing contact role record identified by its row identifier.
  • Delete_Row — Removes a contact role record from the entity.

Tables Accessed

The ETRM metadata does not enumerate specific base tables for this package. Functionally, the package operates on the AR contact role entity — the table storing contact role assignments for customer contacts, referenced through APPS synonyms in the standard EBS manner. The insert, lock, update, and delete routines write to and read from this entity, while check_unique, check_primary, and contact_role_exists perform validation queries against it before changes are committed. Audit columns updated by Insert_Row and Update_Row reflect the WHO columns maintained on the underlying table.

Usage Notes

ARP_CROL_PKG is an internal API rather than a public, documented interface. It is typically invoked by Oracle Receivables forms and supporting validation logic when users create or maintain contacts and their associated roles, and by other AR packages performing programmatic maintenance of contact role data. Because the package is referenced by zero other documented packages in the ETRM catalog, its callers are principally form-level and internal routines. Customizations that must insert, update, or delete contact role rows should call Insert_Row, Update_Row, and Delete_Row rather than issuing direct DML, so that validation and concurrency handling remain centralized. Note that in the shipped 12.1.1/12.2.2 body, check_primary and check_unique are stubbed; developers relying on primary-role uniqueness enforcement should confirm that the rule is enforced through form-level validation or a later-version body before assuming the packaged procedures perform the check.