KVSKBAUpgradeFeaturePriceCalc
Procedures
CopyFrom(Record KVSKBASalesPrice, Record Price List Line) :
Summary: Copies the sales price data from KVSKBASalesPrice table to Price List Line table.
procedure CopyFrom(var KVSKBASalesPrice: Record "KVSKBASalesPrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBASalesPrice: The record of the sales price to copy.PriceListLine: The record of the price list line to update.
Remarks: During the copy, it will also do consistency check on the sales price data. If the data is not consistent, it will not be copied to Price List Line table.
CopyFrom(Record KVSKBASalesLineDiscount, Record Price List Line) :
Summary: Copies the sales line discount data from KVSKBASalesLineDiscount table to Price List Line table.
procedure CopyFrom(var KVSKBASalesLineDiscount: Record "KVSKBASalesLineDiscount"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBASalesLineDiscount: The record of the sales line discount to copy.PriceListLine: The record of the price list line to update.
Remarks: During the copy, it will also do consistency check on the sales line discount data. If the data is not consistent, it will not be copied to Price List Line table.
CopyFrom(Record KVSKBAPurchasePrice, Record Price List Line) :
Summary: Copies the purchase price data from KVSKBAPurchasePrice table to Price List Line table.
procedure CopyFrom(var KVSKBAPurchasePrice: Record "KVSKBAPurchasePrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAPurchasePrice: The record of the purchase price to copy.PriceListLine: The record of the price list line to update.
Remarks: During the copy, it will also do consistency check on the purchase price data. If the data is not consistent, it will not be copied to Price List Line table.
CopyFrom(Record KVSKBAPurchaseLineDiscount, Record Price List Line) :
Summary: Copies the purchase line discount data from KVSKBAPurchaseLineDiscount table to Price List Line table.
procedure CopyFrom(var KVSKBAPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAPurchaseLineDiscount: The record of the purchase line discount to copy.PriceListLine: The record of the price list line to update.
Remarks: During the copy, it will also do consistency check on the purchase line discount data. If the data is not consistent, it will not be copied to Price List Line table.
SetGenerateHeader(Boolean) :
Summary: Sets the flag to determine whether to generate header when inserting price list line, and also determines the way to generate header when the flag is set. If UseDefault is true, the header will be generated based on default price list code; otherwise, the header will be generated based on the combination of dimensions like source type, source no., date, etc.
procedure SetGenerateHeader(UseDefault: Boolean):
Parameters:
UseDefault: The flag to determine the way to generate header when generating header is needed.
InitLineNo(Record Price List Line) :
Summary: Initializes the line number for the price list line. If the record is temporary, it will initialize the line number to 10000 to make sure the line number is not 0; if the record is not temporary, it will set the line number based on the existing lines with the same price list code.
procedure InitLineNo(var PriceListLine: Record "Price List Line"):
Parameters:
PriceListLine: The record of the price list line to initialize line number.
Remarks: When the record is not temporary, it will find the existing lines with the same price list code and set the line number to the max line number + 10000. This is to make sure the new line number is greater than existing line numbers, and also leaves gap between line numbers for future insertions.
Events
OnAfterCountRecords(Record Document Entry) :
Summary: Raised after the record counts for the price calculation feature upgrade have been determined.
[IntegrationEvent(false, false)]
local procedure OnAfterCountRecords(var TempDocumentEntry: Record "Document Entry" temporary):
Parameters:
TempDocumentEntry: The temporary buffer holding table names and record counts to be shown to the user.
Remarks: Subscribe to add, remove, or adjust entries, e.g. to reflect custom tables involved in the feature upgrade.
OnAfterGetListOfTables(Text) :
Summary: Raised after the description of the tables involved in the price calculation feature has been built.
[IntegrationEvent(false, false)]
local procedure OnAfterGetListOfTables(var Result: Text):
Parameters:
Result: The text describing the tables affected by the feature upgrade, shown to the user.
Remarks: Subscribe to append or modify the text, e.g. to mention additional custom tables.
OnAfterUpdateData(Record Feature Data Update Status, Boolean) :
Summary: Raised after has finished processing sales, purchase, and price unit data.
[IntegrationEvent(false, false)]
local procedure OnAfterUpdateData(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to run additional cleanup or follow-up logic once the standard upgrade steps have completed.
OnBeforeChangePurchaseSetup(Record Feature Data Update Status, Boolean) :
Summary: Raised before the Purchases & Payables Setup is reset from extended to standard price calculation.
[IntegrationEvent(false, false)]
local procedure OnBeforeChangePurchaseSetup(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to replace or extend how the purchase setup's price calculation method is reset.
OnBeforeInitLineNo(Record Price List Line, Boolean) :
Summary: Raised before the line number of a new price list line is initialized.
[IntegrationEvent(false, false)]
local procedure OnBeforeInitLineNo(var PriceListLine: Record "Price List Line"; var IsHandled: Boolean):
Parameters:
PriceListLine: The price list line for which the line number is about to be set.IsHandled: System.Object[]
Remarks: Subscribe to implement a custom line numbering scheme instead of the default gap-based numbering.
OnBeforeChangePurchaseDocumentandMasterDataPriceCalcMethod(Record Feature Data Update Status, Boolean) :
Summary: Raised before the price calculation method on purchase master data and documents is switched to the standard method.
[IntegrationEvent(false, false)]
local procedure OnBeforeChangePurchaseDocumentandMasterDataPriceCalcMethod(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to replace or extend which purchase tables have their price calculation method updated.
OnBeforeChangeSalesDocumentandMasterDataPriceCalcMethod(Record Feature Data Update Status, Boolean) :
Summary: Raised before the price calculation method on sales master data and documents is switched to the standard method.
[IntegrationEvent(false, false)]
local procedure OnBeforeChangeSalesDocumentandMasterDataPriceCalcMethod(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to replace or extend which sales tables have their price calculation method updated.
OnBeforeChangeSalesSetup(Record Feature Data Update Status, Boolean) :
Summary: Raised before the Sales & Receivables Setup is reset from extended to standard price calculation.
[IntegrationEvent(false, false)]
local procedure OnBeforeChangeSalesSetup(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to replace or extend how the sales setup's price calculation method is reset.
OnBeforeFindHeader(Record Price List Line, Record Price List Header) :
Summary: Raised before searching for an existing price list header that matches a price list line.
[IntegrationEvent(false, false)]
local procedure OnBeforeFindHeader(PriceListLine: Record "Price List Line"; var PriceListHeader: Record "Price List Header"):
Parameters:
PriceListLine: The price list line for which a matching header is searched.PriceListHeader: System.Object[]
Remarks: Subscribe to add or change filters on PriceListHeader before the lookup is performed.
OnBeforeInsertHeader(Record Price List Line, Record Price List Header) :
Summary: Raised before a new price list header, generated for a price list line, is inserted.
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertHeader(PriceListLine: Record "Price List Line"; var PriceListHeader: Record "Price List Header"):
Parameters:
PriceListLine: The price list line for which the header is being generated.PriceListHeader: System.Object[]
Remarks: Subscribe to adjust field values on PriceListHeader, e.g. Code or Description, before insertion.
OnBeforeUodate(Record Feature Data Update Status, Boolean) :
Summary: Raised before starts processing sales, purchase, and price unit data.
[IntegrationEvent(false, false)]
local procedure OnBeforeUodate(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to fully replace the upgrade logic or to perform preparation steps before it runs.
OnCopyFromPurchLineDiscount(Record KVSKBAPurchaseLineDiscount, Record Price List Line) :
Summary: Raised after a KVSKBAPurchaseLineDiscount record has been mapped onto a price list line, before the line is inserted.
[IntegrationEvent(false, false)]
local procedure OnCopyFromPurchLineDiscount(KVSKBAPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAPurchaseLineDiscount: The source purchase line discount record being copied.PriceListLine: System.Object[]
Remarks: Subscribe to set additional fields on PriceListLine that have no equivalent in the standard mapping.
OnCopyFromPurchasePrice(Record KVSKBAPurchasePrice, Record Price List Line) :
Summary: Raised after a KVSKBAPurchasePrice record has been mapped onto a price list line, before the line is inserted.
[IntegrationEvent(false, false)]
local procedure OnCopyFromPurchasePrice(KVSKBAPurchasePrice: Record "KVSKBAPurchasePrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAPurchasePrice: The source purchase price record being copied.PriceListLine: System.Object[]
Remarks: Subscribe to set additional fields on PriceListLine that have no equivalent in the standard mapping.
OnCopyFromPurchasePriceOnCaseElseType(Record KVSKBAPurchasePrice, Record Price List Line) :
Summary: Raised when a KVSKBAPurchasePrice record has a Type not handled by the standard Item/Item Price Group cases in CopyFrom.
[IntegrationEvent(false, false)]
local procedure OnCopyFromPurchasePriceOnCaseElseType(KVSKBAPurchasePrice: Record "KVSKBAPurchasePrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAPurchasePrice: The source purchase price record whose Type is not natively handled.PriceListLine: The price list line for which Asset Type/Asset No. should be set based on the custom Type.
Remarks: Subscribe to map custom purchase price Type values (e.g. added via table extension) to the corresponding Asset Type/Asset No. on PriceListLine.
OnCopyFromResourcePrice(Record KVSKBAResourcePrice, Record Price List Line) :
Summary: Raised after a KVSKBAResourcePrice record has been mapped onto a price list line, before the line is inserted.
[IntegrationEvent(false, false)]
local procedure OnCopyFromResourcePrice(KVSKBAResourcePrice: Record "KVSKBAResourcePrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBAResourcePrice: The source resource price record being copied.PriceListLine: System.Object[]
Remarks: Subscribe to set additional fields on PriceListLine that have no equivalent in the standard mapping.
OnCopyFromSalesPrice(Record KVSKBASalesPrice, Record Price List Line) :
Summary: Raised after a KVSKBASalesPrice record has been mapped onto a price list line, before the line is inserted.
[IntegrationEvent(false, false)]
local procedure OnCopyFromSalesPrice(var KVSKBASalesPrice: Record "KVSKBASalesPrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBASalesPrice: The source sales price record being copied.PriceListLine: System.Object[]
Remarks: Subscribe to set additional fields on PriceListLine that have no equivalent in the standard mapping.
OnCopyFromSalesPriceOnCaseElseType(Record KVSKBASalesPrice, Record Price List Line) :
Summary: Raised when a KVSKBASalesPrice record has a Type not handled by the standard Item/Item Price Group cases in CopyFrom.
[IntegrationEvent(false, false)]
local procedure OnCopyFromSalesPriceOnCaseElseType(KVSKBASalesPrice: Record "KVSKBASalesPrice"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBASalesPrice: The source sales price record whose Type is not natively handled.PriceListLine: The price list line for which Asset Type/Asset No. should be set based on the custom Type.
Remarks: Subscribe to map custom sales price Type values (e.g. added via table extension) to the corresponding Asset Type/Asset No. on PriceListLine.
OnCopyFromSalesLineDiscount(Record KVSKBASalesLineDiscount, Record Price List Line) :
Summary: Raised after a KVSKBASalesLineDiscount record has been mapped onto a price list line, before the line is inserted.
[IntegrationEvent(false, false)]
local procedure OnCopyFromSalesLineDiscount(var KVSKBASalesLineDiscount: Record "KVSKBASalesLineDiscount"; var PriceListLine: Record "Price List Line"):
Parameters:
KVSKBASalesLineDiscount: The source sales line discount record being copied.PriceListLine: System.Object[]
Remarks: Subscribe to set additional fields on PriceListLine that have no equivalent in the standard mapping.
OnUpdateDataOnBeforeUpdateResourceCost(Record Feature Data Update Status, Boolean) :
Summary: Raised before Resource Cost records are copied into the Price List Line table during the purchase price upgrade.
[IntegrationEvent(false, false)]
local procedure OnUpdateDataOnBeforeUpdateResourceCost(FeatureDataUpdateStatus: Record "Feature Data Update Status"; var IsHandled: Boolean):
Parameters:
FeatureDataUpdateStatus: The status record of the feature data update being processed.IsHandled: System.Object[]
Remarks: Subscribe to replace the standard Resource Cost copy logic, e.g. to apply custom filtering before the records are copied.