{"title":"Codeunit 130510 Library - Price Calculation, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/points/","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","url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/130510-library-price-calculation/source/","path":"src/Layers/W1/Tests/ApplicationTestLibrary/LibraryPriceCalculation.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"table:7006":{"name":"Price Calculation Setup","url":"https://jonas-paprotka.de/ref/table/7006-price-calculation-setup/"},"table:7008":{"name":"Dtld. Price Calculation Setup","url":"https://jonas-paprotka.de/ref/table/7008-dtld-price-calculation-setup/"},"codeunit:7001":{"name":"Price Calculation Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/7001-price-calculation-mgt/"},"table:311":{"name":"Sales & Receivables Setup","url":"https://jonas-paprotka.de/ref/table/311-sales-receivables-setup/"},"table:312":{"name":"Purchases & Payables Setup","url":"https://jonas-paprotka.de/ref/table/312-purchases-payables-setup/"},"table:7000":{"name":"Price List Header","url":"https://jonas-paprotka.de/ref/table/7000-price-list-header/"},"table:315":{"name":"Jobs Setup","url":"https://jonas-paprotka.de/ref/table/315-jobs-setup/"},"codeunit:131000":{"name":"Library - Utility","url":"https://jonas-paprotka.de/ref/codeunit/131000-library-utility/"},"table:7001":{"name":"Price List Line","url":"https://jonas-paprotka.de/ref/table/7001-price-list-line/"},"codeunit:130440":{"name":"Library - Random","url":"https://jonas-paprotka.de/ref/codeunit/130440-library-random/"}},"procs":[{"name":"AddSetup","line":20,"kind":"procedure","params":6,"steps":[[29,"write",7006,"Insert",1]]},{"name":"FindOrAddSetup","line":33,"kind":"procedure","params":6,"steps":[[41,"call","AddSetup",6]]},{"name":"AddDtldSetup","line":47,"kind":"procedure","params":6,"steps":[[56,"validate",7008,"Source Group"],[59,"write",7008,"Insert",1]]},{"name":"AddDtldSetup","line":62,"kind":"procedure","params":5,"steps":[[68,"validate",7008,"Setup Code"],[70,"validate",7008,"Source Group"],[73,"write",7008,"Insert",1]]},{"name":"DisableSetup","line":76,"kind":"procedure","params":1,"steps":[[79,"write",7006,"Modify"]]},{"name":"DisableDtldSetup","line":82,"kind":"procedure","params":1,"steps":[[85,"write",7008,"Modify"]]},{"name":"SetupDefaultHandler","line":109,"kind":"procedure","params":1,"steps":[[123,"write",7006,"DeleteAll"],[124,"run","codeunit",7001],[125,"write",7006,"Modifyall"],[128,"write",7006,"Modifyall"]]},{"name":"AllowEditingActiveSalesPrice","line":138,"kind":"procedure","access":"local","params":1,"steps":[[144,"write",311,"Modify"]]},{"name":"AllowEditingActivePurchPrice","line":152,"kind":"procedure","access":"local","params":1,"steps":[[158,"write",312,"Modify"]]},{"name":"DisallowEditingActiveSalesPrice","line":161,"kind":"procedure","params":0,"steps":[[163,"call","AllowEditingActiveSalesPrice",1]]},{"name":"DisallowEditingActivePurchPrice","line":166,"kind":"procedure","params":0,"steps":[[168,"call","AllowEditingActivePurchPrice",1]]},{"name":"CreateDefaultPriceList","line":171,"kind":"procedure","access":"local","params":2,"steps":[[175,"validate",7000,"Price Type"],[176,"validate",7000,"Source Group"],[180,"validate",7000,"Source Type"],[182,"validate",7000,"Source Type"],[184,"validate",7000,"Source Type"],[188,"write",7000,"Insert",1]]},{"name":"SetDefaultPriceList","line":192,"kind":"procedure","params":2,"steps":[[196,"call","DefineSalesDefaultPriceList",0],[198,"call","DefinePurchDefaultPriceList",0],[200,"call","DefineJobDefaultPriceList",1]]},{"name":"DefineJobDefaultPriceList","line":204,"kind":"procedure","access":"local","params":1,"steps":[[209,"call","CreateDefaultPriceList",2],[216,"write",315,"Modify"]]},{"name":"DefinePurchDefaultPriceList","line":219,"kind":"procedure","access":"local","params":0,"steps":[[224,"call","CreateDefaultPriceList",2],[227,"write",312,"Modify"]]},{"name":"DefineSalesDefaultPriceList","line":230,"kind":"procedure","access":"local","params":0,"steps":[[235,"call","CreateDefaultPriceList",2],[238,"write",311,"Modify"]]},{"name":"ClearDefaultPriceList","line":242,"kind":"procedure","params":2,"steps":[[258,"write",315,"Modify"],[264,"write",312,"Modify"],[270,"write",311,"Modify"]]},{"name":"SetUseCustomLookup","line":275,"kind":"procedure","params":1,"steps":[[284,"write",311,"Modify"]]},{"name":"SetMethodInSalesSetup","line":287,"kind":"procedure","params":0,"steps":[[293,"write",311,"Modify"]]},{"name":"SetMethodInPurchSetup","line":296,"kind":"procedure","params":0,"steps":[[302,"write",312,"Modify"]]},{"name":"CreatePriceHeader","line":305,"kind":"procedure","params":4,"steps":[[308,"ext","codeunit",131000,"GenerateGUID",0],[311,"validate",7000,"Source Type"],[312,"validate",7000,"Source No."],[313,"write",7000,"Insert",1]]},{"name":"CreatePriceHeader","line":316,"kind":"procedure","params":5,"steps":[[319,"ext","codeunit",131000,"GenerateGUID",0],[322,"validate",7000,"Source Type"],[323,"validate",7000,"Parent Source No."],[324,"validate",7000,"Source No."],[325,"write",7000,"Insert",1]]},{"name":"CreatePriceListLine","line":344,"kind":"procedure","params":9,"steps":[[350,"validate",7001,"Source Type"],[351,"validate",7001,"Parent Source No."],[352,"validate",7001,"Source No."],[353,"validate",7001,"Asset Type"],[354,"validate",7001,"Asset No."],[355,"validate",7001,"Amount Type"],[357,"validate",7001,"Line Discount %"],[357,"ext","codeunit",130440,"RandDec",2],[361,"validate",7001,"Unit Price"],[361,"ext","codeunit",130440,"RandDec",2],[363,"validate",7001,"Direct Unit Cost"],[363,"ext","codeunit",130440,"RandDec",2],[365,"write",7001,"Insert",1]]},{"name":"CreatePurchDiscountLine","line":368,"kind":"procedure","params":6,"steps":[[372,"call","CreatePriceListLine",8]]},{"name":"CreatePurchPriceLine","line":377,"kind":"procedure","params":6,"steps":[[381,"call","CreatePriceListLine",8]]},{"name":"CreateSalesDiscountLine","line":386,"kind":"procedure","params":6,"steps":[[390,"call","CreatePriceListLine",8]]},{"name":"CreateSalesPriceLine","line":395,"kind":"procedure","params":6,"steps":[[399,"call","CreatePriceListLine",8]]}]}