{"title":"Codeunit 7021 Purchase Line - Price, events","url":"https://jonas-paprotka.de/ref/codeunit/7021-purchase-line-price/events/","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":7021,"name":"Purchase Line - Price","app":"Base Application","versions":"17-29","url":"https://jonas-paprotka.de/ref/codeunit/7021-purchase-line-price/","json":"https://jonas-paprotka.de/ref/codeunit/7021-purchase-line-price.json"},"aspect":"events","total":16,"rows":[{"name":"OnAfterAddSources","sig":"(Record Purchase Header, Record Purchase Line, Enum Price Type, var Codeunit Price Source List)","named":"(PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\"; PriceType: Enum \"Price Type\"; var PriceSourceList: Codeunit \"Price Source List\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"17-29","first":17,"last":29,"obsoleteSince":null,"spans":[{"from":17,"to":29,"named":"(PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\"; PriceType: Enum \"Price Type\"; var PriceSourceList: Codeunit \"Price Source List\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterFillBuffer","sig":"(var Record Price Calculation Buffer, Record Purchase Header, Record Purchase Line)","named":"(var PriceCalculationBuffer: Record \"Price Calculation Buffer\"; PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"17-29","first":17,"last":29,"obsoleteSince":null,"spans":[{"from":17,"to":29,"named":"(var PriceCalculationBuffer: Record \"Price Calculation Buffer\"; PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterGetDocumentDate","sig":"(var Date, Record Purchase Header, Record Purchase Line)","named":"(var DocumentDate: Date; PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"17-29","first":17,"last":29,"obsoleteSince":null,"spans":[{"from":17,"to":29,"named":"(var DocumentDate: Date; PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterSetPrice","sig":"(var Record Purchase Line, Record Price List Line, Enum Price Amount Type)","named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"17-20","first":17,"last":20,"obsoleteSince":null,"spans":[{"from":17,"to":20,"named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterGetAssetType","sig":"(Record Purchase Line, var Enum Price Asset Type)","named":"(PurchaseLine: Record \"Purchase Line\"; var AssetType: Enum \"Price Asset Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"18-29","first":18,"last":29,"obsoleteSince":null,"spans":[{"from":18,"to":29,"named":"(PurchaseLine: Record \"Purchase Line\"; var AssetType: Enum \"Price Asset Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterUpdate","sig":"(var Record Purchase Line, Enum Price Type, Enum Price Amount Type)","named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"19-20","first":19,"last":20,"obsoleteSince":null,"spans":[{"from":19,"to":20,"named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterValidatePrice","sig":"(var Record Purchase Line, Enum Price Type, Enum Price Amount Type)","named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"19-20","first":19,"last":20,"obsoleteSince":null,"spans":[{"from":19,"to":20,"named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnBeforeSetPrice","sig":"(var Record Purchase Line, Record Price List Line, Enum Price Amount Type, var Boolean)","named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; var IsHandled: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"19-20","first":19,"last":20,"obsoleteSince":null,"spans":[{"from":19,"to":20,"named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; var IsHandled: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterIsDiscountAllowed","sig":"(Record Purchase Line, Boolean, var Boolean)","named":"(PurchaseLine: Record \"Purchase Line\"; PriceCalculated: Boolean; var Result: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(PurchaseLine: Record \"Purchase Line\"; PriceCalculated: Boolean; var Result: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterIsPriceUpdateNeeded","sig":"(Enum Price Amount Type, Boolean, Integer, Record Purchase Line, var Boolean, Boolean)","named":"(AmountType: Enum \"Price Amount Type\"; FoundPrice: Boolean; CalledByFieldNo: Integer; PurchaseLine: Record \"Purchase Line\"; var Result: Boolean; IsSKU: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(AmountType: Enum \"Price Amount Type\"; FoundPrice: Boolean; CalledByFieldNo: Integer; PurchaseLine: Record \"Purchase Line\"; var Result: Boolean; IsSKU: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterSetPrice","sig":"(var Record Purchase Line, Record Price List Line, Enum Price Amount Type, Enum Price Type, var Record Purchase Header)","named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; CurrPriceType: Enum \"Price Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; CurrPriceType: Enum \"Price Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterUpdate","sig":"(var Record Purchase Line, Enum Price Type, Enum Price Amount Type, var Record Purchase Header)","named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterValidatePrice","sig":"(var Record Purchase Line, Enum Price Type, Enum Price Amount Type, var Record Purchase Header)","named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(var PurchaseLine: Record \"Purchase Line\"; CurrPriceType: Enum \"Price Type\"; AmountType: Enum \"Price Amount Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnBeforeVerify","sig":"(Record Purchase Header, Record Purchase Line, var Boolean)","named":"(PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\"; var IsHandled: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(PurchaseHeader: Record \"Purchase Header\"; PurchaseLine: Record \"Purchase Line\"; var IsHandled: Boolean)","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnBeforeSetPrice","sig":"(var Record Purchase Line, Record Price List Line, Enum Price Amount Type, var Boolean, Enum Price Type, var Record Purchase Header)","named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; var IsHandled: Boolean; CurrPriceType: Enum \"Price Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"21-29","first":21,"last":29,"obsoleteSince":null,"spans":[{"from":21,"to":29,"named":"(var PurchaseLine: Record \"Purchase Line\"; PriceListLine: Record \"Price List Line\"; AmountType: Enum \"Price Amount Type\"; var IsHandled: Boolean; CurrPriceType: Enum \"Price Type\"; var PurchaseHeader: Record \"Purchase Header\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnBeforeCopyToBuffer","sig":"(var Record Purchase Header, var Record Purchase Line)","named":"(var PurchaseHeader: Record \"Purchase Header\"; var PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"22-29","first":22,"last":29,"obsoleteSince":null,"spans":[{"from":22,"to":29,"named":"(var PurchaseHeader: Record \"Purchase Header\"; var PurchaseLine: Record \"Purchase Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]}]}