---
id: object/codeunit/781
type: object
title: Codeunit 781 "Sales Pipeline Chart Mgt."
summary: Codeunit 781 "Sales Pipeline Chart Mgt." in Base Application (Microsoft.Sales.Analysis). 6 public procedures, 5 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 524e479ef5600e90824b47edd516effba3f64f521b1d76da19bcf1110b7deb1e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Analysis/SalesPipelineChartMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Sales/Analysis/SalesPipelineChartMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 781
name: Sales Pipeline Chart Mgt.
namespace: Microsoft.Sales.Analysis
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 13
  events: 5
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 2
  implements: 0
---

# Codeunit 781 "Sales Pipeline Chart Mgt."

> Codeunit 781 "Sales Pipeline Chart Mgt." in Base Application (Microsoft.Sales.Analysis). 6 public procedures, 5 events. Present since at least BC23, still in BC30.

Base Application · Microsoft.Sales.Analysis · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Analysis/SalesPipelineChartMgt.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeDrillDown(var OppEntry: Record "Opportunity Entry")` (integration): Raised before opening the opportunity entries page during drill-down.
- `OnBeforeSetDefaultSalesCycle(var SalesCycle: Record "Sales Cycle")` (integration): Raised before selecting the default sales cycle.
- `OnGetOppEntryCountOnBeforeCount(var OppEntry: Record "Opportunity Entry")` (integration): Raised before counting opportunity entries for a sales cycle stage.
- `OnTryNextSalesCycleOnBeforeNextSalesCycleFind(var NextSalesCycle: Record "Sales Cycle")` (integration): Raised before checking if a next sales cycle is available.
- `OnTryPrevSalesCycleOnBeforePrevSalesCycleFind(var PrevSalesCycle: Record "Sales Cycle")` (integration): Raised before checking if a previous sales cycle is available.

## Procedures

- `DrillDown(var BusinessChartBuffer: Record "Business Chart Buffer"; var SalesCycleStage: Record "Sales Cycle Stage")`: Opens the opportunity entries page filtered by the selected sales cycle stage.
- `GetOppEntryCount(SalesCycleCode: Code[10]; SalesCycleStage: Integer): Integer`: Returns the count of opportunity entries for the specified sales cycle and stage.
- `InsertTempSalesCycleStage(var TempSalesCycleStage: Record "Sales Cycle Stage" temporary; SalesCycle: Record "Sales Cycle")`: Populates a temporary table with stages from the specified sales cycle.
- `SetDefaultSalesCycle(var SalesCycle: Record "Sales Cycle"; var NextSalesCycleAvailable: Boolean; var PrevSalesCycleAvailable: Boolean): Boolean`: Sets the default sales cycle and determines navigation availability.
- `SetPrevNextSalesCycle(var SalesCycle: Record "Sales Cycle"; var NextSalesCycleAvailable: Boolean; var PrevSalesCycleAvailable: Boolean; Step: Integer)`: Navigates to the previous or next sales cycle and updates availability flags.
- `UpdateData(var BusinessChartBuffer: Record "Business Chart Buffer"; var TempSalesCycleStage: Record "Sales Cycle Stage" temporary; SalesCycle: Record "Sales Cycle")`: Updates the chart data with opportunity counts for each sales cycle stage.

Plus 2 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Page 5130 "Opportunity Entries"](../page/5130.md) (1 call: `DrillDown → (object)`)

## Called by

- [Codeunit 6309 "PBI Sales Pipeline Chart Calc."](../codeunit/6309.md) (2 calls: `GetValues → InsertTempSalesCycleStage`, `InsertToBuffer → GetOppEntryCount`)
- [Page 781 "Sales Pipeline Chart"](../page/781.md) (2 calls: `OnOpenPage → SetDefaultSalesCycle`, `UpdateChart → UpdateData`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Sales Pipeline Chart Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
