---
id: object/codeunit/7009
type: object
title: Codeunit 7009 "CopyFromToPriceListLine"
summary: Codeunit 7009 "CopyFromToPriceListLine" in Base Application (Microsoft.Pricing.PriceList). 14 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27-28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 578a2a5fae2b060d2449703c6e83f302fae4aa59427de39c97f1ddcde9ad7c32
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Pricing/PriceList/CopyFromToPriceListLine.Codeunit.al
    title: src/Layers/W1/BaseApp/Pricing/PriceList/CopyFromToPriceListLine.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: 7009
name: CopyFromToPriceListLine
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"
  - "25"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 63
  events: 15
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 4
  implements: 0
---

# Codeunit 7009 "CopyFromToPriceListLine"

> Codeunit 7009 "CopyFromToPriceListLine" in Base Application (Microsoft.Pricing.PriceList). 14 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27-28.

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

## Events published

- `OnAfterInitLineNo(var PriceListLine: Record "Price List Line")` (integration)
- `OnBeforeFindHeader(PriceListLine: Record "Price List Line"; var PriceListHeader: Record "Price List Header")` (integration)
- `OnBeforeInsertHeader(PriceListLine: Record "Price List Line"; var PriceListHeader: Record "Price List Header")` (integration)
- `OnBeforeInsertPriceListLine(var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromPurchLineDiscount(PurchaseLineDiscount: Record "Purchase Line Discount"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromPurchasePrice(PurchasePrice: Record "Purchase Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromResourceCost(ResourceCost: Record "Resource Cost"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromResourcePrice(ResourcePrice: Record "Resource Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromJobItemPrice(var JobItemPrice: Record "Job Item Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromJobGLAccountPrice(var JobGLAccountPrice: Record "Job G/L Account Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromJobResourcePrice(var JobResourcePrice: Record "Job Resource Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromSalesPrice(var SalesPrice: Record "Sales Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyToSalesPrice(var SalesPrice: Record "Sales Price"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyFromSalesLineDiscount(var SalesLineDiscount: Record "Sales Line Discount"; var PriceListLine: Record "Price List Line")` (integration)
- `OnCopyToSalesLineDiscount(var SalesLineDiscount: Record "Sales Line Discount"; var PriceListLine: Record "Price List Line")` (integration)

## Procedures

- `SetGenerateHeader()`
- `SetGenerateHeader(UseDefault: Boolean)`
- `CopyFrom(var SalesPrice: Record "Sales Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var SalesLineDiscount: Record "Sales Line Discount"; var PriceListLine: Record "Price List Line")`
- `CopyTo(var TempSalesPrice: Record "Sales Price" temporary; var PriceListLine: Record "Price List Line"): Boolean`
- `CopyTo(var TempSalesLineDiscount: Record "Sales Line Discount" temporary; var PriceListLine: Record "Price List Line"): Boolean`
- `CopyFrom(var JobItemPrice: Record "Job Item Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var JobGLAccountPrice: Record "Job G/L Account Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var JobResourcePrice: Record "Job Resource Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var ResourceCost: Record "Resource Cost"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var ResourcePrice: Record "Resource Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var PurchasePrice: Record "Purchase Price"; var PriceListLine: Record "Price List Line")`
- `CopyFrom(var PurchaseLineDiscount: Record "Purchase Line Discount"; var PriceListLine: Record "Price List Line")`
- `InitLineNo(var PriceListLine: Record "Price List Line")`

Plus 34 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 7017 "Price List Management"](../codeunit/7017.md) (2 calls: `InitLineNo → DefineDefaultPriceList`, `SetPriceListCode → GetDefaultPriceListCode`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `InsertHeader → LogUptake`, `InsertHeader → LogUsage`)
- [Codeunit 220 "Resource-Find Cost"](../codeunit/220.md) (1 call: `CreatePriceLinePerResource → (object)`)
- [Codeunit 7001 "Price Calculation Mgt."](../codeunit/7001.md) (1 call: `InsertHeader → GetFeatureTelemetryName`)

## Called by

- [Codeunit 7003 "Price Calculation - V15"](../codeunit/7003.md) (3 calls: `FindDiscount → CopyFrom`, `FindPrice → CopyFrom`, `ShowPrices → CopyTo`)
- [Codeunit 104000 "Upgrade - BaseApp"](../codeunit/104000.md) (2 calls: `InsertPriceListLine → InitLineNo`, `InsertPriceListLine → SetGenerateHeader`)
- [Codeunit 6113 "Item Data Migration Facade"](../codeunit/6113.md) (2 calls: `InsertPriceListLine → InitLineNo`, `InsertPriceListLine → SetGenerateHeader`)
- [Codeunit 7049 "Feature - Price Calculation"](../codeunit/7049.md) (2 calls: `UpdateData → CopyFrom`, `UpdateData → SetGenerateHeader`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC27-28

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