{"title":"Codeunit 130510 Library - Price Calculation, procedures","url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/procedures/","author":"JOP-AL","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/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":130510,"name":"Library - Price Calculation","app":"Application Test Library","versions":"28-29","url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/","json":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation.json"},"aspect":"procedures","total":29,"rows":[{"name":"AddSetup","sig":"(var Record Price Calculation Setup, Enum Price Calculation Method, Enum Price Type, Enum Price Asset Type, Enum Price Calculation Handler, Boolean)","named":"(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)","returns":"Code[100]","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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)","returns":"Code[100]","kind":"procedure","access":"public","obsolete":null}]},{"name":"AddDtldSetup","sig":"(var Record Dtld. Price Calculation Setup, Enum Price Type, Enum Price Asset Type, Code[20], Enum Price Source Group, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"AddDtldSetup","sig":"(var Record Dtld. Price Calculation Setup, Code[100], Code[20], Enum Price Source Group, Code[20])","named":"(var DtldPriceCalculationSetup: Record \"Dtld. Price Calculation Setup\"; SetupCode: Code[100]; AssetNo: Code[20]; SourceGroup: Enum \"Price Source Group\"; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var DtldPriceCalculationSetup: Record \"Dtld. Price Calculation Setup\"; SetupCode: Code[100]; AssetNo: Code[20]; SourceGroup: Enum \"Price Source Group\"; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"DisableSetup","sig":"(var Record Price Calculation Setup)","named":"(var PriceCalculationSetup: Record \"Price Calculation Setup\")","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var PriceCalculationSetup: Record \"Price Calculation Setup\")","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"DisableDtldSetup","sig":"(var Record Dtld. Price Calculation Setup)","named":"(var DtldPriceCalculationSetup: Record \"Dtld. Price Calculation Setup\")","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var DtldPriceCalculationSetup: Record \"Dtld. Price Calculation Setup\")","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"DisableExtendedPriceCalculation","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"EnableExtendedPriceCalculation","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"EnableExtendedPriceCalculation","sig":"(Boolean)","named":"(Enable: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(Enable: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetupDefaultHandler","sig":"(Enum Price Calculation Handler)","named":"(NewImplementation: Enum \"Price Calculation Handler\")","returns":"Enum Price Calculation Handler","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(NewImplementation: Enum \"Price Calculation Handler\")","returns":"Enum Price Calculation Handler","kind":"procedure","access":"public","obsolete":null}]},{"name":"AllowEditingActiveSalesPrice","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"AllowEditingActivePurchPrice","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"DisallowEditingActiveSalesPrice","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"DisallowEditingActivePurchPrice","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetDefaultPriceList","sig":"(Enum Price Type, Enum Price Source Group)","named":"(PriceType: Enum \"Price Type\"; SourceGroup: Enum \"Price Source Group\")","returns":"Code[20]","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(PriceType: Enum \"Price Type\"; SourceGroup: Enum \"Price Source Group\")","returns":"Code[20]","kind":"procedure","access":"public","obsolete":null}]},{"name":"ClearDefaultPriceList","sig":"(Enum Price Type, Enum Price Source Group)","named":"(PriceType: Enum \"Price Type\"; SourceGroup: Enum \"Price Source Group\")","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(PriceType: Enum \"Price Type\"; SourceGroup: Enum \"Price Source Group\")","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetUseCustomLookup","sig":"(Boolean)","named":"(NewValue: Boolean)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(NewValue: Boolean)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetMethodInSalesSetup","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetMethodInPurchSetup","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePriceHeader","sig":"(var Record Price List Header, Enum Price Type, Enum Price Source Type, Code[20])","named":"(var PriceListHeader: Record \"Price List Header\"; PriceType: Enum \"Price Type\"; SourceType: Enum \"Price Source Type\"; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var PriceListHeader: Record \"Price List Header\"; PriceType: Enum \"Price Type\"; SourceType: Enum \"Price Source Type\"; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePriceHeader","sig":"(var Record Price List Header, Enum Price Type, Enum Price Source Type, Code[20], Code[20])","named":"(var PriceListHeader: Record \"Price List Header\"; PriceType: Enum \"Price Type\"; SourceType: Enum \"Price Source Type\"; ParentSourceNo: Code[20]; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var PriceListHeader: Record \"Price List Header\"; PriceType: Enum \"Price Type\"; SourceType: Enum \"Price Source Type\"; ParentSourceNo: Code[20]; SourceNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePriceListLine","sig":"(var Record Price List Line, Record Price List Header, Enum Price Amount Type, Enum Price Asset Type, Code[20])","named":"(var PriceListLine: Record \"Price List Line\"; PriceListHeader: Record \"Price List Header\"; AmountType: Enum \"Price Amount Type\"; AssetType: Enum \"Price Asset Type\"; AssetNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var PriceListLine: Record \"Price List Line\"; PriceListHeader: Record \"Price List Header\"; AmountType: Enum \"Price Amount Type\"; AssetType: Enum \"Price Asset Type\"; AssetNo: Code[20])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePriceListLine","sig":"(var Record Price List Line, Code[20], Enum Price Type, Enum Price Source Type, Code[20], Enum Price Amount Type, Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePriceListLine","sig":"(var Record Price List Line, Code[20], Enum Price Type, Enum Price Source Type, Code[20], Code[20], Enum Price Amount Type, Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePurchDiscountLine","sig":"(var Record Price List Line, Code[20], Enum Price Source Type, Code[20], Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreatePurchPriceLine","sig":"(var Record Price List Line, Code[20], Enum Price Source Type, Code[20], Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreateSalesDiscountLine","sig":"(var Record Price List Line, Code[20], Enum Price Source Type, Code[20], Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"CreateSalesPriceLine","sig":"(var Record Price List Line, Code[20], Enum Price Source Type, Code[20], Enum Price Asset Type, Code[20])","named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(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])","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"ExtendedPriceCalculationEnabledHandler","sig":"(var Boolean)","named":"(var Result: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"28-29","first":28,"last":29,"obsoleteSince":null,"spans":[{"from":28,"to":29,"named":"(var Result: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"FindOrAddSetup","sig":"(var Record Price Calculation Setup, Enum Price Calculation Method, Enum Price Type, Enum Price Asset Type, Enum Price Calculation Handler, Boolean)","named":"(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)","returns":"Code[100]","kind":"procedure","access":"public","obsolete":null,"range":"29","first":29,"last":29,"obsoleteSince":null,"spans":[{"from":29,"to":29,"named":"(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)","returns":"Code[100]","kind":"procedure","access":"public","obsolete":null}]}]}