---
id: object/codeunit/7017
type: object
title: Codeunit 7017 "Price List Management"
summary: Codeunit 7017 "Price List Management" in Base Application (Microsoft.Pricing.PriceList). 33 public procedures, 22 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC28-29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 2817b6e5c64e3e3ba9a72cd39ef07e23832d4e57b1791222aa2a6ef89a9404e5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Pricing/PriceList/PriceListManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Pricing/PriceList/PriceListManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10167
    - change/bcapps/9571
object_type: codeunit
object_id: 7017
name: Price List Management
namespace: Microsoft.Pricing.PriceList
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 84
  events: 22
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 8
  called_by: 12
  implements: 0
---

# Codeunit 7017 "Price List Management"

> Codeunit 7017 "Price List Management" in Base Application (Microsoft.Pricing.PriceList). 33 public procedures, 22 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24, BC28-29.

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

## Events published

- `OnAddLineOnAfterPopulatePriceListLineFields(var PriceListLine: Record "Price List Line"; ToPriceListHeader: Record "Price List Header"; PriceAsset: Record "Price Asset"; PriceLineFilters: Record "Price Line Filters")` (integration)
- `OnBeforeAddLine(PriceListHeader: Record "Price List Header"; PriceAsset: Record "Price Asset"; PriceLineFilters: Record "Price Line Filters"; var IsHandled: Boolean)` (integration)
- `OnActivateDraftLinesOnAfterPriceListLineModifyAll(var PriceListHeader: Record "Price List Header"; var SkipMessage: Boolean)` (integration)
- `OnAfterActivateDraftLines(PriceListLine: Record "Price List Line")` (integration)
- `OnAfterBuildSourceFilters(var PriceSource: Record "Price Source"; var SourceFilter: array[3] of Text)` (integration)
- `OnAfterImplementNewPrice(var PriceWorksheetLine: Record "Price Worksheet Line"; var PriceListLine: Record "Price List Line"; var Implemented: Boolean)` (integration)
- `OnAfterIsAllowedEditingActivePrice(PriceType: Enum "Price Type"; var Result: Boolean)` (integration)
- `OnBeforeFindDuplicatePriceListLine(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line"; AsLineDefaults: Boolean; SearchInside: Boolean)` (integration)
- `OnBuildAssetFiltersOnBeforeFindLines(var PriceListLine: Record "Price List Line"; PriceAsset: Record "Price Asset")` (integration)
- `OnBuildSourceFiltersOnBeforeFindLines(var PriceListLine: Record "Price List Line"; PriceSource: Record "Price Source")` (integration)
- `OnCopyToWorksheetLineOnBeforeInsert(var PriceWorksheetLine: Record "Price Worksheet Line"; FromPriceListLine: Record "Price List Line")` (integration)
- `OnCopyLinesOnAfterFromPriceListLineSetFilters(var PriceListLine: Record "Price List Line"; PriceLineFilters: Record "Price Line Filters")` (integration)
- `OnCopyLineOnAfterAdjustAmounts(var ToPriceListLine: Record "Price List Line"; PriceLineFilters: Record "Price Line Filters"; var FromPriceListLine: Record "Price List Line"; ToPriceListHeader: Record "Price List Header")` (integration)
- `OnBeforeImplementNewPrice(var PriceWorksheetLine: Record "Price Worksheet Line"; var Implemented: Boolean; var IsHandled: Boolean)` (integration)
- `OnCopyLineOnAfterInsertFromPriceListLine(FromPriceListLine: Record "Price List Line"; var ToPriceListLine: Record "Price List Line")` (integration)
- `OnBeforeImplementNewPrices(var PriceWorksheetLine: Record "Price Worksheet Line")` (integration)
- `OnAfterSetHeadersFilters(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line")` (integration)
- `OnAfterSetAssetFilters(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line")` (integration)
- `OnBeforeResolveDuplicatePrices(PriceListHeader: Record "Price List Header"; var Resolved: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterClearSourceFilters(var PriceListLine: Record "Price List Line")` (integration)
- `OnAfterClearAssetFilters(var PriceListLine: Record "Price List Line")` (integration)
- `OnCheckIfPriceListLineMarkingIsNeededOnBeforeFindLines(var PriceListLine: Record "Price List Line"; var PriceAsset: Record "Price Asset")` (integration)

## Event subscriptions

- OnAfterCopyToPriceSource subscribes to Table "Price List Line" OnBeforeModifyEvent

## Procedures

- `AddLines(var PriceListHeader: Record "Price List Header")`
- `AddLines(var ToPriceListHeader: Record "Price List Header"; PriceLineFilters: Record "Price Line Filters")`
- `AdjustAmount(var Price: Decimal; PriceLineFilters: Record "Price Line Filters")`
- `CopyLines(var ToPriceListHeader: Record "Price List Header")`
- `CopyLines(var ToPriceListHeader: Record "Price List Header"; UpdateMultiplePriceLists: Boolean)`
- `CopyLines(var ToPriceListHeader: Record "Price List Header"; PriceLineFilters: Record "Price Line Filters")`
- `FindDuplicatePrice(PriceListLine: Record "Price List Line"): Boolean`
- `FindDuplicatePrices(PriceListHeader: Record "Price List Header"; SearchInside: Boolean; var DuplicatePriceLine: Record "Duplicate Price Line"): Boolean`
- `FindDuplicatePrices(PriceListHeader: Record "Price List Header"; var PriceListLine: Record "Price List Line"; SearchInside: Boolean; var DuplicatePriceLine: Record "Duplicate Price Line"): Boolean`
- `GetDefaultPriceListCode(PriceType: Enum "Price Type"; SourceGroup: Enum "Price Source Group"; FailIfBlank: Boolean): Code[20]`
- `DefineDefaultPriceList(PriceType: Enum "Price Type"; SourceGroup: Enum "Price Source Group"): Code[20]`
- `IsAllowedEditingActivePrice(PriceType: Enum "Price Type"): Boolean`
- `SendVerifyLinesNotification()`
- `SendVerifyLinesNotification(PriceListHeader: Record "Price List Header")`
- `ActivateDraftLines(VerifyLinesNotification: Notification)`
- `ActivateDraftLines(VerifyLinesNotification: Notification; SkipMessage: Boolean)`
- `ActivateDraftLines(PriceListHeader: Record "Price List Header"): Boolean`
- `ActivateDraftLines(PriceListHeader: Record "Price List Header"; SkipMessage: Boolean): Boolean`
- `ActivateDraftLines(var PriceListLine: Record "Price List Line")`
- `VerifyLines(var PriceListLine: Record "Price List Line")`
- `ResolveDuplicatePrices(PriceListHeader: Record "Price List Header"): Boolean`
- `ResolveDuplicatePrices(var PriceListLine: Record "Price List Line")`
- `SetPriceListsFilters(var PriceListHeader: Record "Price List Header"; PriceSourceList: Codeunit "Price Source List"; AmountType: Enum "Price Amount Type")`
- `SetPriceListLineFilters(var PriceListLine: Record "Price List Line"; PriceSourceList: Codeunit "Price Source List"; AmountType: Enum "Price Amount Type")`
- `SetPriceListLineFilters(var PriceListLine: Record "Price List Line"; PriceSource: Record "Price Source"; PriceAssetList: Codeunit "Price Asset List"; AmountType: Enum "Price Amount Type"): Boolean`
- `FindIfPriceExists()`
- `IsPriceFound(): Boolean`
- `SetHeadersFilters(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line")`
- `SetAssetFilters(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line")`
- `ResolveDuplicatePrices(PriceListHeader: Record "Price List Header"; var DuplicatePriceLine: Record "Duplicate Price Line"): Boolean`
- `ImplementNewPrices(var PriceWorksheetLine: Record "Price Worksheet Line")`
- `VerifySourceGroupInLines(): Boolean`
- `UpdateSourceGroupInLines(UpgradeNotification: Notification)`

Plus 28 local procedures.

## 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.

- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (5 calls: `CreateDefaultPriceList → LogUptake`, `CreateDefaultPriceList → LogUsage`, `DefineDefaultPriceList → LogUptake`, …)
- [Codeunit 7007 "Price Asset List"](../codeunit/7007.md) (4 calls: `BuildAssetFilters → First`, `BuildAssetFilters → Next`, `CheckIfPriceListLineMarkingIsNeeded → First`, …)
- [Codeunit 7011 "Price Source List"](../codeunit/7011.md) (4 calls: `BuildSourceFilters → First`, `BuildSourceFilters → Next`, `SetPriceListLineFilters → GetPriceType`, …)
- [Codeunit 7001 "Price Calculation Mgt."](../codeunit/7001.md) (3 calls: `CreateDefaultPriceList → GetFeatureTelemetryName`, `DefineDefaultPriceList → GetFeatureTelemetryName`, `ImplementNewPrices → GetFeatureTelemetryName`)
- [Codeunit 9998 "Upgrade Tag Definitions"](../codeunit/9998.md) (2 calls: `VerifySourceGroupInLines → GetPriceSourceGroupFixedUpgradeTag`, `VerifySourceGroupInLines → GetSyncPriceListLineStatusUpgradeTag`)
- [Codeunit 1511 "Notification Lifecycle Mgt."](../codeunit/1511.md) (1 call: `VerifySourceGroupInLines → SendNotification`)
- [Codeunit 9999 "Upgrade Tag"](../codeunit/9999.md) (1 call: `VerifySourceGroupInLines → HasUpgradeTag`)
- [Page 673 "Job Queue Entry Card"](../page/673.md) (1 call: `UpdateSourceGroupInLines → (object)`)

## Called by

- [Page 7016 "Sales Price List"](../page/7016.md) (3 calls: `OnAfterGetCurrRecord → SendVerifyLinesNotification`, `OnOpenPage → VerifySourceGroupInLines`, `OnQueryClosePage → SendVerifyLinesNotification`)
- [Page 7018 "Purchase Price List"](../page/7018.md) (3 calls: `OnAfterGetCurrRecord → SendVerifyLinesNotification`, `OnOpenPage → VerifySourceGroupInLines`, `OnQueryClosePage → SendVerifyLinesNotification`)
- [Page 7022 "Price Worksheet"](../page/7022.md) (3 calls: `OnOpenPage → VerifySourceGroupInLines`, `SetDefaultPriceListCode → GetDefaultPriceListCode`, `SetDefaultPriceListCode → IsAllowedEditingActivePrice`)
- [Table 7000 "Price List Header"](../table/7000.md) (3 calls: `IsAllowedEditingActivePrice → IsAllowedEditingActivePrice`, `UpdateStatus → ResolveDuplicatePrices`, `UpdateStatus → VerifyLines`)
- [Codeunit 7009 "CopyFromToPriceListLine"](../codeunit/7009.md) (2 calls: `InitLineNo → DefineDefaultPriceList`, `SetPriceListCode → GetDefaultPriceListCode`)
- [Table 7022 "Price Worksheet Line"](../table/7022.md) (2 calls: `IsAllowedEditingActivePrice → IsAllowedEditingActivePrice`, `OnInsert → GetDefaultPriceListCode`)
- [Codeunit 104000 "Upgrade - BaseApp"](../codeunit/104000.md) (1 call: `InsertPriceListLine → FindDuplicatePrice`)
- [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) (1 call: `ConfirmEditingActivePriceList → IsAllowedEditingActivePrice`)
- [Codeunit 7018 "Price UX Management"](../codeunit/7018.md) (1 call: `SetPriceListLineFilters → SetPriceListLineFilters`)
- [Codeunit 7049 "Feature - Price Calculation"](../codeunit/7049.md) (1 call: `DefineDefaultPriceList → DefineDefaultPriceList`)
- [Page 7005 "Price List Line Review"](../page/7005.md) (1 call: `OnQueryClosePage → SendVerifyLinesNotification`)
- [Table 7001 "Price List Line"](../table/7001.md) (1 call: `IsAllowedEditingActivePrice → IsAllowedEditingActivePrice`)

## Recent changes

- 2026-08-13 [#10167 [Extensibility Request] issue 30240: add event before adding price list lines](../../changes/bcapps/10167.md) (main, BC30, feature)
- 2026-07-22 [#9571 [Master]-Opening price list from Customer Card is extremely slow on large datasets (~220s) due to AddAllSourceType call](../../changes/bcapps/9571.md) (main, BC30, performance)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC28-29

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: "Price List Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
