---
title: "Codeunit 130510 Library - Price Calculation"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/
type: codeunit
id: 130510
name: "Library - Price Calculation"
app: "Application Test Library"
versions: "28-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/source/"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 130510 Library - Price Calculation

JOP-AL, https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/

| | |
| --- | --- |
| App | Application Test Library |
| Versions | 28-29 |
| Minors | W1 28.0-29.0; DE 28.0-29.0; US 28.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/editions.json) |
| EventSubscriberInstance | Manual |
| Source file | LibraryPriceCalculation.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| AddSetup | (var PriceCalculationSetup: Record "Price Calculation Setup"; NewMethod: Enum "Price Calculation Method"; PriceType: Enum "Price Type"; AssetType: Enum "Price Asset Type"; NewImplementation: Enum "Price Calculation Handler"; NewDefault: Boolean) | Code[100] | public | 28-29 | - | - |
| AddDtldSetup | (var DtldPriceCalculationSetup: Record "Dtld. Price Calculation Setup"; PriceType: Enum "Price Type"; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]; SourceGroup: Enum "Price Source Group"; SourceNo: Code[20]) | - | public | 28-29 | - | - |
| AddDtldSetup | (var DtldPriceCalculationSetup: Record "Dtld. Price Calculation Setup"; SetupCode: Code[100]; AssetNo: Code[20]; SourceGroup: Enum "Price Source Group"; SourceNo: Code[20]) | - | public | 28-29 | - | - |
| DisableSetup | (var PriceCalculationSetup: Record "Price Calculation Setup") | - | public | 28-29 | - | - |
| DisableDtldSetup | (var DtldPriceCalculationSetup: Record "Dtld. Price Calculation Setup") | - | public | 28-29 | - | - |
| DisableExtendedPriceCalculation | () | - | public | 28-29 | - | - |
| EnableExtendedPriceCalculation | () | - | public | 28-29 | - | - |
| EnableExtendedPriceCalculation | (Enable: Boolean) | - | public | 28-29 | - | - |
| SetupDefaultHandler | (NewImplementation: Enum "Price Calculation Handler") | Enum Price Calculation Handler | public | 28-29 | - | - |
| AllowEditingActiveSalesPrice | () | - | public | 28-29 | - | - |
| AllowEditingActivePurchPrice | () | - | public | 28-29 | - | - |
| DisallowEditingActiveSalesPrice | () | - | public | 28-29 | - | - |
| DisallowEditingActivePurchPrice | () | - | public | 28-29 | - | - |
| SetDefaultPriceList | (PriceType: Enum "Price Type"; SourceGroup: Enum "Price Source Group") | Code[20] | public | 28-29 | - | - |
| ClearDefaultPriceList | (PriceType: Enum "Price Type"; SourceGroup: Enum "Price Source Group") | - | public | 28-29 | - | - |
| SetUseCustomLookup | (NewValue: Boolean) | Boolean | public | 28-29 | - | - |
| SetMethodInSalesSetup | () | - | public | 28-29 | - | - |
| SetMethodInPurchSetup | () | - | public | 28-29 | - | - |
| CreatePriceHeader | (var PriceListHeader: Record "Price List Header"; PriceType: Enum "Price Type"; SourceType: Enum "Price Source Type"; SourceNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePriceHeader | (var PriceListHeader: Record "Price List Header"; PriceType: Enum "Price Type"; SourceType: Enum "Price Source Type"; ParentSourceNo: Code[20]; SourceNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePriceListLine | (var PriceListLine: Record "Price List Line"; PriceListHeader: Record "Price List Header"; AmountType: Enum "Price Amount Type"; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePriceListLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; PriceType: Enum "Price Type"; SourceType: Enum "Price Source Type"; SourceNo: Code[20]; AmountType: Enum "Price Amount Type"; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePriceListLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; PriceType: Enum "Price Type"; SourceType: Enum "Price Source Type"; ParentSourceNo: Code[20]; SourceNo: Code[20]; AmountType: Enum "Price Amount Type"; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePurchDiscountLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; SourceType: Enum "Price Source Type"; SourceNo: Code[20]; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreatePurchPriceLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; SourceType: Enum "Price Source Type"; SourceNo: Code[20]; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreateSalesDiscountLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; SourceType: Enum "Price Source Type"; SourceNo: Code[20]; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| CreateSalesPriceLine | (var PriceListLine: Record "Price List Line"; PriceListCode: Code[20]; SourceType: Enum "Price Source Type"; SourceNo: Code[20]; AssetType: Enum "Price Asset Type"; AssetNo: Code[20]) | - | public | 28-29 | - | - |
| ExtendedPriceCalculationEnabledHandler | (var Result: Boolean) | - | public | 28-29 | - | - |
| FindOrAddSetup | (var PriceCalculationSetup: Record "Price Calculation Setup"; NewMethod: Enum "Price Calculation Method"; PriceType: Enum "Price Type"; AssetType: Enum "Price Asset Type"; NewImplementation: Enum "Price Calculation Handler"; NewDefault: Boolean) | Code[100] | public | 29 | - | - |

## Source

Symbols: Microsoft.ApplicationTestLibrary.symbols.d852d5d2-a39d-4179-baeb-f99a19e32510, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
