Search Results as_sales_leads_log




Overview

The AS_SALES_LEADS_LOG table is a core data object within the Oracle E-Business Suite (EBS) 12.1.1 and 12.2.2, specifically for the Sales Foundation module (AS). As a log table, its primary function is to provide a historical audit trail for changes made to sales opportunities, which are stored as leads in the system. It operates as a supporting object to the main transactional table, AS_SALES_LEADS, capturing a sequential record of modifications to ensure data integrity, support compliance, and enable historical analysis of the sales pipeline's evolution.

Key Information Stored

The table's structure is designed to record the details of each change event. While the full column list is not provided in the excerpt, the documented primary key is the LOG_ID column, which uniquely identifies each log entry. The most critical foreign key column is SALES_LEAD_ID, which links each log entry to its parent record in the AS_SALES_LEADS table. Typically, a log table of this nature would also contain columns such as the date and time of the change (LAST_UPDATE_DATE), the user who made the modification (LAST_UPDATED_BY), the type of change performed (e.g., UPDATE, STATUS_CHANGE), and a snapshot of the modified column values (OLD_VALUE, NEW_VALUE) or a complete before-image of the record. This allows administrators and reports to reconstruct the state of a sales lead at any point in its lifecycle.

Common Use Cases and Queries

The primary use case for AS_SALES_LEADS_LOG is auditing and change tracking. Common scenarios include analyzing the frequency of updates to high-value opportunities, troubleshooting data discrepancies by reviewing the modification history, and generating reports on sales team activity. A typical query would join this log to the main leads table to get descriptive information.

  • Retrieve Full Change History for a Lead: SELECT log.* FROM osm.as_sales_leads_log log WHERE log.sales_lead_id = :p_lead_id ORDER BY log.log_id;
  • Report on Recent Lead Modifications: SELECT lead.lead_number, log.last_updated_by, log.last_update_date FROM osm.as_sales_leads lead, osm.as_sales_leads_log log WHERE lead.sales_lead_id = log.sales_lead_id AND log.last_update_date > SYSDATE - 7;

Related Objects

The AS_SALES_LEADS_LOG table has a direct and documented dependency on the primary transactional table for sales leads. The relationship is enforced via a foreign key constraint.

  • AS_SALES_LEADS: This is the primary parent table. The foreign key relationship is defined from AS_SALES_LEADS_LOG.SALES_LEAD_ID to the AS_SALES_LEADS table. Any log entry must reference a valid, existing sales lead record. This ensures referential integrity and that the audit trail is always linked to a genuine business object.