{"title":"Codeunit 130510 Library - Price Calculation","url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/","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","changedSince":"2026-09-22","source":{"feed":"https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json","package":"Microsoft.ApplicationTestLibrary.symbols.d852d5d2-a39d-4179-baeb-f99a19e32510","build":"29.0.54011.55644","builds":{"28":"28.5.54151.54365","29":"29.0.54011.55644"},"code":{"29":{"url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/source/","repo":"https://github.com/microsoft/BCApps","branch":"releases/29.x","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","path":"src/Layers/W1/Tests/ApplicationTestLibrary/LibraryPriceCalculation.Codeunit.al","license":"MIT"}},"note":"Presence per major, highest build of each; 17 is the oldest major on the feed. Local procedures are not listed."},"object":{"type":"codeunit","id":130510,"name":"Library - Price Calculation","app":"Application Test Library","appByVersion":[{"app":"Application Test Library","from":28}],"nameByVersion":[{"name":"Library - Price Calculation","from":28}],"namespace":"","versions":"28-29","majors":[28,29],"countries":["W1","DE","US"],"minors":{"W1":"28.0-29.0","DE":"28.0-29.0","US":"28.0-29.0"},"minorsUrl":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/editions.json","extends":null,"extendsUrl":null,"sourceTable":null,"properties":{"eventSubscriberInstance":"Manual"},"extendedBy":[],"implementedBy":[],"sourceFile":"LibraryPriceCalculation.Codeunit.al","obsolete":null,"obsoleteSeenFrom":null,"byVersion":{"28":{"app":"Application Test Library","name":"Library - Price Calculation","ns":"","obsolete":null,"target":"","sourceTable":"","props":{"eventSubscriberInstance":"Manual"},"counts":{"fields":0,"keys":0,"methods":28,"values":0},"stub":false},"29":{"app":"Application Test Library","name":"Library - Price Calculation","ns":"","obsolete":null,"target":"","sourceTable":"","props":{"eventSubscriberInstance":"Manual"},"counts":{"fields":0,"keys":0,"methods":29,"values":0},"stub":false}},"fields":[],"keys":[],"procedures":[{"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}]}],"events":[],"values":[],"controls":[],"actions":[]}}