KVSKBAPurchaseLib
Procedures
CalcDUnitCostInPurchLine(Record Purchase Line) :
Summary: Recalculates KVSKBADirectUnitCostPriceUnit on a Purchase Line based on Direct Unit Cost × KVSKBAPriceUnit, and sets KVSKBAPrintLine to true if Direct Unit Cost is non-zero.
procedure CalcDUnitCostInPurchLine(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line to update.
Remarks: If KVSKBAPriceUnit is 0, it is treated as 1 before the multiplication. KVSKBAPrintLine is only set to true; it is never reset to false by this procedure. Raises OnBeforeCalcDUnitCostInPurchLine (IsHandled pattern).
SetSkipErroratNumbering(Boolean) :
Summary: Controls whether the error message in EvaluatePurchaseLine is suppressed when position numbering is incomplete.
procedure SetSkipErroratNumbering(NewSkipErroratNumbering: Boolean):
Parameters:
NewSkipErroratNumbering: Pass true to suppress the error; pass false to re-enable it.
Remarks: Sets the module-level SkipErroratNumbering flag. Useful for batch operations that call EvaluatePurchaseLine programmatically without user interaction.
SetSkipShowNumberingPage(Boolean) :
Summary: Controls whether the numbering-type selection page is suppressed in EvaluatePurchaseLine when the setup does not define a default numbering type.
procedure SetSkipShowNumberingPage(NewSkipShowNumberingPage: Boolean):
Parameters:
NewSkipShowNumberingPage: Pass true to suppress the page; pass false to re-enable it.
Remarks: Sets the module-level SkipShowNumberingPage flag. When true and no default numbering type is configured, EvaluatePurchaseLine will fall back to the error path instead of opening the dialog.
EvaluatePurchaseLine(Record Purchase Header, Boolean) :
Summary: Recalculates the subtotal/bundle structure (KVSKBATotaling, KVSKBAIndentation) and optionally the position numbers (KVSKBAPositionNo) for all lines of a Purchase Header.
procedure EvaluatePurchaseLine(PurchaseHeader: Record "Purchase Header"; PosNumbering: Boolean):
Parameters:
PurchaseHeader: The purchase header whose lines are processed.PosNumbering: If true, position numbers are also recalculated according to the configured numbering type (Numbering or Structure).
Remarks: When PosNumbering = true, reads KVSKBAAutomPosNumberingType from Purchases & Payables Setup to determine the numbering strategy. If the setup type is blank and GuiAllowed, opens the KVSKBAPositionNumbering page for the user to choose; without GUI or when SkipErroratNumbering = false, raises ManualReleaseNecessaryErr. Calls CheckTotalStructureInPurchLine before iterating lines (without totaling check).
CalcSubTotals39(Record Purchase Line) :
Summary: Calculates and sets the Line Amount on an EndSubtotalBundle purchase line by summing the totaling range via the KVSKBASubtotal FlowField.
procedure CalcSubTotals39(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line to update. Only processed if Type = KVSKBAEndSubtotalBundle.
Remarks: If KVSKBATotaling is empty, Line Amount is set to 0. Otherwise CalcFields(KVSKBASubtotal) is called and the result is written to Line Amount. For all other line types, no action is taken.
ResetSubTotalsTab39(Record Purchase Line) :
Summary: Resets the Line Amount to 0 on an EndSubtotalBundle purchase line.
procedure ResetSubTotalsTab39(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line to update. Only processed if Type = KVSKBAEndSubtotalBundle.
Remarks: Used to clear a previously calculated subtotal without recalculating the FlowField. For all other line types, no action is taken.
CalcFieldsAfterInitInTab39(Record Purchase Line, Record Purchase Line) :
Summary: Restores the KVSKBAPositionNo field on a Purchase Line from the previous line state after an Init call.
procedure CalcFieldsAfterInitInTab39(var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line being updated.xPurchaseLine: The previous state of the purchase line providing the position number to restore.
Remarks: Called after Init in Table 39 to prevent the position number from being cleared by the Init call.
FindBundlePurchRcptLine(Record Purch. Rcpt. Line, Record Purch. Rcpt. Line) : Boolean
Summary: Searches backwards from a given Purchase Receipt Line to find the nearest preceding Bundle, Subtotal, or EndSubtotalBundle line, returning whether it is a Bundle line.
procedure FindBundlePurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var BundleStartPurchRcptLine: Record "Purch. Rcpt. Line"): Boolean
Parameters:
PurchRcptLine: The receipt line from which the backwards search starts.BundleStartPurchRcptLine: Returns the found preceding structure line (Bundle, Subtotal, or EndSubtotalBundle), if any.
Returns: True if the found line is of Type = KVSKBABundle; false if it is a Subtotal or EndSubtotalBundle, or if no structure line was found.
Remarks: Iterates backwards through all receipt lines in the same document with a lower Line No. than the input line. Stops at the first line whose Type is Bundle, Subtotal, or EndSubtotalBundle.
FindBundleReturnShptLine(Record Return Shipment Line, Record Return Shipment Line) : Boolean
Summary: Searches backwards from a given Return Shipment Line to find the nearest preceding Bundle, Subtotal, or EndSubtotalBundle line, returning whether it is a Bundle line.
procedure FindBundleReturnShptLine(ReturnShipmentLine: Record "Return Shipment Line"; var BundleStartReturnShipmentLine: Record "Return Shipment Line"): Boolean
Parameters:
ReturnShipmentLine: The return shipment line from which the backwards search starts.BundleStartReturnShipmentLine: Returns the found preceding structure line (Bundle, Subtotal, or EndSubtotalBundle), if any.
Returns: True if the found line is of Type = KVSKBABundle; false if it is a Subtotal or EndSubtotalBundle, or if no structure line was found.
Remarks: Iterates backwards through all return shipment lines in the same document with a lower Line No. than the input line. Stops at the first line whose Type is Bundle, Subtotal, or EndSubtotalBundle.
InsertBundleLines(Record Purchase Line, Boolean, Boolean, Boolean, Text[100], Code[20]) :
Summary: Inserts one or two new bundle structure lines (EndSubtotalBundle and/or Bundle) into a purchase document before or after a given Purchase Line.
procedure InsertBundleLines(PurchaseLine: Record "Purchase Line"; BeforeCurrentLine: Boolean; CloseOldBundle: Boolean; OpenNewBundle: Boolean; DescriptionText: Text[100]; PosNo: Code[20]):
Parameters:
PurchaseLine: The reference purchase line; new lines are inserted relative to this line's position.BeforeCurrentLine: If true, new lines are inserted before PurchaseLine; if false, they are inserted after it.CloseOldBundle: If true, an EndSubtotalBundle line is inserted to close the current bundle.OpenNewBundle: If true, a new Bundle line is inserted to open a new bundle group.DescriptionText: The description text assigned to the new Bundle line (if OpenNewBundle = true).PosNo: The position number assigned to the new Bundle line (if OpenNewBundle = true).
Remarks: Line spacing is calculated by dividing the gap between adjacent lines by (1 + number of new lines). If no preceding or following line exists, a spacing of 10000 is used as a fallback. Exits immediately if both CloseOldBundle and OpenNewBundle are false.
CheckVendorInNoTab38(Record Purchase Header) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
[Obsolete('The procedure is obsolete and not longer used, because standard functionality is used', '28.0')]
procedure CheckVendorInNoTab38(PurchaseHeader: Record "Purchase Header"):
CalcPurchHistoryDateFilter(Text) :
Summary: Calculates the date filter string for the purchase history based on the KVSKBADateFormulaPurchHistory setting in Purchases & Payables Setup.
procedure CalcPurchHistoryDateFilter(var NewDateFilter: Text):
Parameters:
NewDateFilter: Returns the calculated date filter string (e.g., "01.01.2024.."); returns an empty string if no date formula is configured.
Remarks: If KVSKBADateFormulaPurchHistory is blank, NewDateFilter is returned as an empty string and no filtering is applied. The filter is constructed as "CalcDate(formula, WorkDate())..", selecting records from the calculated start date onwards.
CalcNoOfDocuments(Record Vendor, Boolean, Integer) :
Summary: Fills an array with the count of archived purchase documents (Quote, Order, Blanket Order, Return Order) for a given vendor, respecting the Date Filter.
procedure CalcNoOfDocuments(var Vendor: Record "Vendor"; PayTo: Boolean; var NoOfDocsArray: Integer):
Parameters:
Vendor: The vendor whose archived documents are counted. If Vendor No. is empty, NoOfDocsArray is cleared and the procedure exits.PayTo: If true, counts documents by Pay-to Vendor No.; if false, by Buy-from Vendor No.NoOfDocsArray: An array (1-based, indices 1-6) that receives the document counts: [1]=Quote, [2]=Order, [5]=Blanket Order, [6]=Return Order. Indices 3-4 are not populated.
Remarks: Requires Read permission on Purchase Header Archive; if not available, the array is cleared and the procedure exits. Applies Vendor.GetFilter("Date Filter") to each document type count.
DeleteAddedTablesTab38(Record Purchase Header) :
Summary: Deletes all header-level KVSKBAPurchaseDocumentText records (Document Line No. = 0) associated with a Purchase Header.
procedure DeleteAddedTablesTab38(PurchHeaderPar: Record "Purchase Header"):
Parameters:
PurchHeaderPar: The purchase header whose document texts are to be deleted.
Remarks: Only deletes records with Document Line No. = 0 (header texts). Line-level texts are handled by DeleteAddedTablesTab39. Raises OnDeleteAddedTablesTab38 after the deletion.
DeleteAddedTablesTab39(Record Purchase Line) :
Summary: Deletes all KVSKBAPurchaseDocumentText and KVSKBAPurchOrderConfLine records associated with a Purchase Line.
procedure DeleteAddedTablesTab39(PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line whose related records are to be deleted. Skipped if Line No. = 0 for document texts.
Remarks: Document texts are only deleted when Line No. <> 0. Purchase order confirmation lines are always deleted regardless of Line No. Raises OnDeleteAddedTablesTab39 after the deletions.
CopyAddedTablesLineNoToTab39(Record Purchase Line) :
Summary: Copies line-type/item-level extended text records to the KVSKBAPurchaseDocumentText table for a Purchase Line.
procedure CopyAddedTablesLineNoToTab39(PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line to which item/type extended texts are copied.
Remarks: Delegates to KVSKBATransferExtendedText.AutomLineTypeNo2PurchDocText. Raises OnCopyAddedTablesLineNoToTab39 after the copy.
CopyAddedTablesTab38ToTab38(Record Purchase Header, Record Purchase Header) :
Summary: Copies header-level KVSKBAPurchaseDocumentText records from one Purchase Header to another, filtered by date validity.
procedure CopyAddedTablesTab38ToTab38(FromPurchaseHeader: Record "Purchase Header"; PurchaseHeader: Record "Purchase Header"):
Parameters:
FromPurchaseHeader: The source purchase header whose header texts are copied.PurchaseHeader: The target purchase header that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab38ToTab38 (IsHandled pattern) before the copy and OnCopyAddedTablesTab38ToTab38 after. Only records with Document Line No. = 0 and a valid date range (Starting/Ending Date covering WorkDate) are copied.
CopyAddedTablesTab39ToTab39(Record Purchase Line, Record Purchase Line) :
Summary: Copies line-level KVSKBAPurchaseDocumentText records from one Purchase Line to another, filtered by date validity.
procedure CopyAddedTablesTab39ToTab39(FromPurchaseLine: Record "Purchase Line"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromPurchaseLine: The source purchase line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab39ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab39ToTab39 after. Only records with a valid date range (Starting/Ending Date covering WorkDate) are copied.
CopyAddedTablesTab121ToTab39(Record Purch. Rcpt. Line, Record Purchase Line) :
Summary: Copies line-level KVSKBAPostedPurchDocumentText records from a Posted Purchase Receipt line back to a Purchase Line (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab121ToTab39(FromPurchRcptLine: Record "Purch. Rcpt. Line"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromPurchRcptLine: The source posted receipt line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab121ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab121ToTab39 after. Only records with a valid date range are copied back to the purchase document.
CopyAddedTablesTab123ToTab39(Record Purch. Inv. Line, Record Purchase Line) :
Summary: Copies line-level KVSKBAPostedPurchDocumentText records from a Posted Purchase Invoice line back to a Purchase Line (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab123ToTab39(FromPurchInvLine: Record "Purch. Inv. Line"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromPurchInvLine: The source posted invoice line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab123ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab123ToTab39 after. Only records with a valid date range are copied.
CopyAddedTablesTab125ToTab39(Record Purch. Cr. Memo Line, Record Purchase Line) :
Summary: Copies line-level KVSKBAPostedPurchDocumentText records from a Posted Purchase Credit Memo line back to a Purchase Line (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab125ToTab39(FromPurchCrMemoLine: Record "Purch. Cr. Memo Line"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromPurchCrMemoLine: The source posted credit memo line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab125ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab125ToTab39 after. Only records with a valid date range are copied.
CopyAddedTablesTab6651ToTab39(Record Return Shipment Line, Record Purchase Line) :
Summary: Copies line-level KVSKBAPostedPurchDocumentText records from a Posted Return Shipment line back to a Purchase Line (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab6651ToTab39(FromReturnShipmentLine: Record "Return Shipment Line"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromReturnShipmentLine: The source posted return shipment line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab6651ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab6651ToTab39 after. Only records with a valid date range are copied.
CopyAddedTablesTab5109ToTab38(Record Purchase Header Archive, Record Purchase Header) :
Summary: Copies header-level KVSKBAPurchDocumentTextArchive records from a Purchase Header Archive back to a Purchase Header (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab5109ToTab38(FromPurchaseHeaderArchive: Record "Purchase Header Archive"; ToPurchaseHeader: Record "Purchase Header"):
Parameters:
FromPurchaseHeaderArchive: The source archive header whose header texts are copied.ToPurchaseHeader: The target purchase header that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab5109ToTab38 (IsHandled pattern) before the copy and OnCopyAddedTablesTab5109ToTab38 after. Filters by Document Type, No., Doc. No. Occurrence, Version No., Document Line No. = 0, and a valid date range.
CopyAddedTablesTab5110ToTab39(Record Purchase Line Archive, Record Purchase Line) :
Summary: Copies line-level KVSKBAPurchDocumentTextArchive records from a Purchase Line Archive back to a Purchase Line (KVSKBAPurchaseDocumentText).
procedure CopyAddedTablesTab5110ToTab39(FromPurchaseLineArchive: Record "Purchase Line Archive"; ToPurchaseLine: Record "Purchase Line"):
Parameters:
FromPurchaseLineArchive: The source archive line whose line texts are copied.ToPurchaseLine: The target purchase line that receives the copied texts.
Remarks: Raises OnBeforeCopyAddedTablesTab5110ToTab39 (IsHandled pattern) before the copy and OnCopyAddedTablesTab5110ToTab39 after. Filters by Document Type, No., Doc. No. Occurrence, Version No., Line No., and a valid date range.
ShowPurchDocTextLines(Enum Purchase Document Type, Code[20], Integer, Enum KVSKBATextPosition) :
procedure ShowPurchDocTextLines(PurchaseDocumentType: Enum "Purchase Document Type"; DocNo: Code[20]; DocLineNo: Integer; TextPosition: Enum "KVSKBATextPosition"):
CalcNoOfPurchDocTextLines(Enum Purchase Document Type, Code[20], Integer, Enum KVSKBATextPosition) : Integer
procedure CalcNoOfPurchDocTextLines(PurchaseDocumentType: Enum "Purchase Document Type"; DocNo: Code[20]; DocLineNo: Integer; TextPosition: Enum "KVSKBATextPosition"): Integer
GetSpecialNote(Integer, Code[20]) : Text[50]
Summary: Retrieves the special note text for a Vendor or Item by reading all Comment Lines with the configured special notes code and concatenating them into a single string.
procedure GetSpecialNote(TableNo: Integer; No: Code[20]): Text[50]
Parameters:
TableNo: The table number identifying the entity type: Database::Vendor or Database::Item.No: The number (vendor or item code) whose comments are read.
Returns: The concatenated comment text, truncated to 50 characters. Returns an empty string if no code is configured or No. is empty.
Remarks: The special notes code is read from Purchases & Payables Setup (KVSKBACodeofSpecialNotes). Concatenation stops early if the total text would exceed the 50-character return length. Raises OnGetSpecialNoteSetCommentLineFilter to allow subscribers to add additional filters on the Comment Line record.
ShowSpecialNote(Integer, Code[20]) :
Summary: Opens the Comment Line page filtered to the special notes for a Vendor or Item, allowing interactive viewing or editing.
procedure ShowSpecialNote(TableNo: Integer; No: Code[20]):
Parameters:
TableNo: The table number identifying the entity type: Database::Vendor or Database::Item.No: The number (vendor or item code) whose comments are shown.
Remarks: Exits without opening the page if KVSKBACodeofSpecialNotes is not configured or No. is empty. The page is opened modally via Page.RunModal.
CheckTotalStructureInPurchLine(Record Purchase Header, Boolean) :
Summary: Validates the Bundle/Subtotal/EndSubtotalBundle structure of a Purchase Header's lines, raising an error if the structure is invalid.
procedure CheckTotalStructureInPurchLine(PurchaseHeader: Record "Purchase Header"; CheckTotaling: Boolean):
Parameters:
PurchaseHeader: The purchase header whose lines are validated.CheckTotaling: If true, also checks that each EndSubtotalBundle line's KVSKBATotaling field matches the expected range calculated from the current line structure.
Remarks: Raises BundleCannotContainerAnotherBundleErr if a Bundle line is found inside another Bundle. Raises BundleCannotConaintSubtotalErr if a Subtotal line is found inside a Bundle. Raises EndTotalHasNoSubtotalErr if an EndSubtotalBundle has no matching open Bundle or Subtotal. Raises NoOfEndTotalsIsNotEqualsToBeginTotalsErr if there are unclosed Bundles or Subtotals at the end. When CheckTotaling = true, raises WrongStructureErr if any KVSKBATotaling range does not match.
RunCalcPosNoInPurchLines(Record Purchase Header, Boolean) : Boolean
Summary: Checks whether position numbers need to be recalculated for a Purchase Header's lines, and optionally triggers the recalculation.
procedure RunCalcPosNoInPurchLines(PurchaseHeader: Record "Purchase Header"; Unconditionally: Boolean): Boolean
Parameters:
PurchaseHeader: The purchase header whose lines are checked.Unconditionally: If true, triggers EvaluatePurchaseLine to recalculate position numbers when incomplete; if false, only returns true/false without modifying lines.
Returns: True if at least one eligible line has an empty position number; false if no recalculation is needed or KVSKBACheckPosNoInPurchLines is disabled.
Remarks: The Unconditionally = false path is used in reports to determine whether to print the document without modifying data. When Unconditionally = true and the document is not in Open status, EvaluatePurchaseLine raises PosNoIncompleteErr if auto-numbering is configured. Raises OnRunCalcPosNoInPurchLinesOnAfterFilterPurchaseLine to allow subscribers to narrow the filter on the Purchase Line record.
CheckPosNoNotEmptyInPurchLine(Record Purchase Header) :
Summary: Ensures all eligible Purchase Lines on a Purchase Header have a non-empty position number, triggering automatic renumbering if configured and the document is open.
procedure CheckPosNoNotEmptyInPurchLine(PurchaseHeader: Record "Purchase Header"):
Parameters:
PurchaseHeader: The purchase header whose line position numbers are validated.
Remarks: Raises OnBeforeCheckPosNoNotEmptyInPurchLine (IsHandled pattern). If KVSKBACheckPosNoInPurchLines = "automatic numbering" and the document is in Open status, calls EvaluatePurchaseLine to fix missing position numbers. If the document is not open or auto-numbering is disabled, raises PosNoIncompleteErr when any position number is missing. For partial numbering (some filled, some empty), prompts the user via confirm dialog before auto-renumbering.
CreatePurchOrderConfLines(Record Purchase Line) :
Summary: Create "Purch. Order Confirmation"s for all marked lines (parameter PurchLineVar) A ConfNo and a ConfDate will be added. Both will be getted by a dialog-form, opened at the beginning.
procedure CreatePurchOrderConfLines(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The set of purchase lines (with filters/marks applied) for which confirmation lines are created. Each found line is processed.
Remarks: Opens the KVSKBACreatePurchOrderConf dialog to obtain ConfNo, ConfDate, and optional ConfirmedDeliveryDate. If date conflicts with existing reservations or order tracking are detected, the user is prompted before proceeding. Raises OnBeforeCreatePurchOrderConfLines (IsHandled pattern), OnCreatePurchOrderConfLinesOnBeforePurchaseLineFindSet, and OnCreatePurchOrderConfLinesOnBeforeValidatePurchLinePromisedReceiptDate for each line.
CalculatePurchaseOrderConfirmationLineForPurchLine(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine) :
Summary: Calculates a "Purchase Order Confirmation" line for a given "Purchase Line".
procedure CalculatePurchaseOrderConfirmationLineForPurchLine(PurchaseLine: Record "Purchase Line"; ConfirmationNo: Code[20]; DocumentDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"):
Parameters:
PurchaseLine: Record "Purchase Line", Field "Promised Receipt Date" is used as "Confirmation Date"ConfirmationNo: Code[20]DocumentDate: Set the "Document Date" for the confirmation linePurchOrderConfLine: Record KVSKBAPurchOrderConfLine
Remarks: The "Confirmation Date" is taken from the Purchase Line's "Promised Receipt Date".
CalcPurchOrderConfLine4PurchLi(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
[Obsolete('This function is obsolete, the ConfDate is used as DocumentDate, Use CalculatePurchaseOrderConfirmationLineForPurchLine instead', '26.5')]
procedure CalcPurchOrderConfLine4PurchLi(PurchaseLine: Record "Purchase Line"; ConfNo: Code[20]; ConfDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"):
ShowPurchOrderConfLines(Enum Purchase Document Type, Code[20], Integer) :
procedure ShowPurchOrderConfLines(PurchaseDocumentType: Enum "Purchase Document Type"; DocNo: Code[20]; LineNo: Integer):
ValidQuoteBlanketOrderLinesExistPurchaseLine(Record Purchase Line, Boolean, Boolean, Boolean, Boolean) :
Summary: Checks whether existing Quote or Blanket Order lines for the same item/variant/vendor already exist, and shows a notification to the user if so.
procedure ValidQuoteBlanketOrderLinesExistPurchaseLine(var OrigPurchaseLine: Record "Purchase Line"; CheckQuotes: Boolean; CheckBlankOrders: Boolean; var MessageQuotesShown: Boolean; var MessageBlankOrdersShown: Boolean):
Parameters:
OrigPurchaseLine: The purchase line being validated (must be an Item-type line in a Quote, Order, or Blanket Order).CheckQuotes: If true, checks for existing quote lines with the same item, variant, and pay-to vendor.CheckBlankOrders: If true, checks for existing blanket order lines with outstanding quantity.MessageQuotesShown: Returns true if a notification for existing quotes was triggered.MessageBlankOrdersShown: Returns true if a notification for existing blanket orders was triggered.
Remarks: Notifications are only shown when the corresponding KVSKBAInstructionMgt instruction is enabled. Raises OnMessageExistBlankOrderPurchaseLineOnSetFilter to allow subscribers to add additional filters for the blanket order check. The notification includes an action button that opens a selection page for the user to optionally link to an existing document.
Events
OnAfterCopyPriceUnitFromPurchPriceToPurchLine(Record KVSKBAPurchasePrice, Record Purchase Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised after copying the price unit from a purchase price record to a purchase line.
[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnAfterCopyPriceUnitFromPurchPriceToPurchLine(KVSKBAPurchPrice: Record "KVSKBAPurchasePrice"; var PurchLine: Record "Purchase Line"):
Parameters:
KVSKBAPurchPrice: The source purchase price record from which the price unit was copied.PurchLine: The purchase line that was updated with the price unit.
Remarks: This event is obsolete. The price calculation needs a redesign due to standard changes.
OnAfterShowPurchDocTextLines(Enum Purchase Document Type, Code[20], Integer, Enum KVSKBATextPosition) :
[IntegrationEvent(false, false)]
local procedure OnAfterShowPurchDocTextLines(PurchaseDocumentType: Enum "Purchase Document Type"; DocNo: Code[20]; DocLineNo: Integer; KVSKBATextPosition: Enum "KVSKBATextPosition"):
OnBeforeGetDefaultPurchaseOrderType(Record Purchase Header, Boolean) :
Summary: Event is raised before determining the default purchase order type for a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeGetDefaultPurchaseOrderType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header for which the default order type is being determined.IsHandled: Set to true to skip the default processing.
Remarks: Set IsHandled to true to prevent the default order type logic from executing.
OnAfterTestAdditionalTableRelationatPurchLine(Record Purchase Line) :
Summary: Event is raised after testing additional table relations on a purchase line.
[IntegrationEvent(false, false)]
local procedure OnAfterTestAdditionalTableRelationatPurchLine(PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line on which the table relations were tested.
Remarks: Subscribe to this event to perform additional validation after the standard relation checks.
OnBeforeCalcNoOfPurchDocTextLines(Enum Purchase Document Type, Code[20], Integer, Enum KVSKBATextPosition, Decimal, Boolean) :
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcNoOfPurchDocTextLines(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; DocLineNo: Integer; Position: Enum "KVSKBATextPosition"; var ReturnValue: Decimal; var Handled: Boolean):
OnBeforeCalculatePurchaseOrderConfirmationLineForPurchLine(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine, Boolean) :
Summary: Event is raised before calculating a "Purchase Order Confirmation" line for a given "Purchase Line".
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculatePurchaseOrderConfirmationLineForPurchLine(PurchaseLine: Record "Purchase Line"; ConfirmationNo: Code[20]; DocumentDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"; var IsHandled: Boolean):
Parameters:
PurchaseLine: Source Record "Purchase Line"ConfirmationNo: Confirmation No. to be usedDocumentDate: Document Date to be usedPurchOrderConfLine: New "Purchase Order Confirmation" line to be calculatedIsHandled: Set to TRUE to skip default processing
OnBeforeCalcPurchOrderConfLine4PurchLi(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before calculating a purchase order confirmation line for a purchase line.
[Obsolete('Event is obsolete, use OnBeforeCalculatePurchaseOrderConfirmationLineForPurchLine instead', '26.5')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcPurchOrderConfLine4PurchLi(PurchaseLine: Record "Purchase Line"; ConfNo: Code[20]; ConfDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"; var Handled: Boolean):
Parameters:
PurchaseLine: The source purchase line.ConfNo: The confirmation number to be used.ConfDate: The confirmation date to be used.PurchOrderConfLine: The purchase order confirmation line to be calculated.Handled: Set to true to skip the default processing.
Remarks: This event is obsolete. Use OnBeforeCalculatePurchaseOrderConfirmationLineForPurchLine instead.
OnBeforeCheckPosNoNotEmptyInPurchLine(Record Purchase Header, Boolean) :
Summary: Event is raised before checking that the position number is not empty in purchase lines.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckPosNoNotEmptyInPurchLine(PurchaseHeaderPar: Record "Purchase Header"; var HandledVar: Boolean):
Parameters:
PurchaseHeaderPar: The purchase header whose lines are being validated.HandledVar: Set to true to skip the default position number check.
Remarks: Set HandledVar to true to prevent the default empty position number validation from running.
OnBeforeCreatePurchOrderConfLines(Record Purchase Line, Boolean) :
Summary: Event is raised before creating purchase order confirmation lines.
[IntegrationEvent(false, false)]
local procedure OnBeforeCreatePurchOrderConfLines(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line filter used to select lines for confirmation.Handled: Set to true to skip the default creation of confirmation lines.
Remarks: Set Handled to true to replace the default confirmation line creation with custom logic.
OnBeforeTransferfieldHeaderInTab39(Record Purchase Header, Record Purchase Line, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before transferring header fields to a purchase line (Table 39).
[Obsolete('Event is obsolete, the source procedure is no longer used', '28.0')]
[IntegrationEvent(false, false)]
local procedure OnBeforeTransferfieldHeaderInTab39(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseHeader: The purchase header whose fields are being transferred.PurchaseLine: The purchase line receiving the transferred fields.Handled: Set to true to skip the default field transfer.
Remarks: This event is obsolete. The source procedure is no longer used.
OnBeforeTransferPurchLine2ItemJnLine(Record Purchase Header, Record Purchase Line, Record Item Journal Line, Boolean) :
Summary: Event is raised before transferring fields from a purchase line to an item journal line.
[IntegrationEvent(false, false)]
local procedure OnBeforeTransferPurchLine2ItemJnLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line"; var Handled: Boolean):
Parameters:
PurchaseHeader: The purchase header of the source document.PurchaseLine: The purchase line whose data is being transferred.ItemJournalLine: The item journal line being populated.Handled: Set to true to skip the default field transfer.
Remarks: Set Handled to true to replace the default transfer logic with a custom implementation.
OnBeforeCalcPUInPurchLine(Record Purchase Line, Boolean) :
Summary: Event is raised before calculating the price unit (PU) in a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcPUInPurchLine(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line for which the price unit is being calculated.Handled: Set to true to skip the default price unit calculation.
Remarks: Set Handled to true to replace the default price unit calculation with custom logic.
OnBeforeCalcDUnitCostPUInPurchLine(Record Purchase Line, Boolean) :
Summary: Event is raised before calculating the direct unit cost price unit (DUnitCostPU) in a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcDUnitCostPUInPurchLine(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line for which the direct unit cost price unit is being calculated.Handled: Set to true to skip the default calculation.
Remarks: Set Handled to true to replace the default direct unit cost price unit calculation with custom logic.
OnBeforeCalcDUnitCostInPurchLine(Record Purchase Line, Boolean) :
Summary: Event is raised before calculating the direct unit cost in a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcDUnitCostInPurchLine(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line for which the direct unit cost is being calculated.Handled: Set to true to skip the default direct unit cost calculation.
Remarks: Set Handled to true to replace the default direct unit cost calculation with custom logic.
OnBeforeCalcNoInPurchLine(Record Purchase Line, Boolean) :
Summary: Event is raised before calculating the item number (No.) in a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcNoInPurchLine(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line for which the item number is being calculated.Handled: Set to true to skip the default item number calculation.
Remarks: Set Handled to true to replace the default No. calculation with custom logic.
OnBeforeCalcPUInPurchPrice(Record KVSKBAPurchasePrice, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before calculating the price unit (PU) in a purchase price record.
[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcPUInPurchPrice(var PurchasePrice: Record "KVSKBAPurchasePrice"; var Handled: Boolean):
Parameters:
PurchasePrice: The purchase price record for which the price unit is being calculated.Handled: Set to true to skip the default price unit calculation.
Remarks: This event is obsolete. The price calculation needs a redesign due to standard changes.
OnBeforeCalcDUnitCostInPurchPrice(Record KVSKBAPurchasePrice, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before calculating the direct unit cost in a purchase price record.
[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcDUnitCostInPurchPrice(var PurchasePrice: Record "KVSKBAPurchasePrice"; var Handled: Boolean):
Parameters:
PurchasePrice: The purchase price record for which the direct unit cost is being calculated.Handled: Set to true to skip the default direct unit cost calculation.
Remarks: This event is obsolete. The price calculation needs a redesign due to standard changes.
OnBeforeCalcPUInReqLine(Record Requisition Line, Boolean) :
Summary: Event is raised before calculating the price unit (PU) in a requisition line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcPUInReqLine(var RequisitionLine: Record "Requisition Line"; var Handled: Boolean):
Parameters:
RequisitionLine: The requisition line for which the price unit is being calculated.Handled: Set to true to skip the default price unit calculation.
Remarks: Set Handled to true to replace the default price unit calculation with custom logic.
OnBeforeCalcDUnitCostPUInReqLine(Record Requisition Line, Boolean) :
Summary: Event is raised before calculating the direct unit cost price unit (DUnitCostPU) in a requisition line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcDUnitCostPUInReqLine(var RequisitionLine: Record "Requisition Line"; var Handled: Boolean):
Parameters:
RequisitionLine: The requisition line for which the direct unit cost price unit is being calculated.Handled: Set to true to skip the default calculation.
Remarks: Set Handled to true to replace the default direct unit cost price unit calculation with custom logic.
OnBeforeCalcDUnitCostInReqLine(Record Requisition Line, Boolean) :
Summary: Event is raised before calculating the direct unit cost in a requisition line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcDUnitCostInReqLine(var RequisitionLine: Record "Requisition Line"; var Handled: Boolean):
Parameters:
RequisitionLine: The requisition line for which the direct unit cost is being calculated.Handled: Set to true to skip the default direct unit cost calculation.
Remarks: Set Handled to true to replace the default direct unit cost calculation with custom logic.
OnBeforeCheckPrintLineInTabPurchaseLine(Record Purchase Line, Boolean) :
Summary: Event is raised before checking whether the print line structure is valid for a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckPrintLineInTabPurchaseLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line being checked.IsHandled: Set to true to skip the default print line validation.
Remarks: Set IsHandled to true to prevent the default print line structure check from executing.
OnCreatePurchOrderConfLinesOnBeforeValidatePurchLinePromisedReceiptDate(Record Purchase Line, Code[20], Date, Boolean) :
Summary: Event is raised before validating the Promised Receipt Date on a purchase line during creation of purchase order confirmation lines.
[IntegrationEvent(false, false)]
local procedure OnCreatePurchOrderConfLinesOnBeforeValidatePurchLinePromisedReceiptDate(var PurchaseLine: Record "Purchase Line"; ConfNo: Code[20]; ConfDate: Date; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line being processed.ConfNo: The confirmation number being applied.ConfDate: The confirmation date being applied.IsHandled: Set to true to skip the default Promised Receipt Date validation.
Remarks: Set IsHandled to true to prevent the default Promised Receipt Date validation from executing.
OnCreatePurchOrderConfLinesOnBeforePurchaseLineFindSet(Record Purchase Line, Code[20], Date, Boolean) :
Summary: Event is raised before calling FindSet on the purchase line when creating purchase order confirmation lines.
[IntegrationEvent(false, false)]
local procedure OnCreatePurchOrderConfLinesOnBeforePurchaseLineFindSet(var PurchaseLine: Record "Purchase Line"; ConfNo: Code[20]; ConfDate: Date; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line record with applied filters.ConfNo: The confirmation number being applied.ConfDate: The confirmation date being applied.IsHandled: Set to true to skip the default FindSet and line processing.
Remarks: Set IsHandled to true to replace the default line iteration logic with a custom implementation.
OnCopyAddedTablesVendToTab38(Record Purchase Header) :
Summary: Event is raised to copy additional vendor data to a purchase header (Table 38).
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesVendToTab38(PurchaseHeaderPar: Record "Purchase Header"):
Parameters:
PurchaseHeaderPar: The purchase header to which additional vendor data is being copied.
Remarks: Subscribe to this event to copy custom vendor-related fields to the purchase header.
OnCopyAddedTablesLineNoToTab39(Record Purchase Line) :
Summary: Event is raised to copy additional line number data to a purchase line (Table 39).
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesLineNoToTab39(PurchaseLinePar: Record "Purchase Line"):
Parameters:
PurchaseLinePar: The purchase line to which additional line number data is being copied.
Remarks: Subscribe to this event to copy custom line-number-related fields to the purchase line.
OnBeforeCopyAddedTablesTab38ToTab38(Record Purchase Header, Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from one purchase header to another.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab38(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchaseHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchaseHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab38ToTab120(Record Purchase Header, Record Purch. Rcpt. Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase header to a purchase receipt header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab120(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchRcptHeaderPar: Record "Purch. Rcpt. Header"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchRcptHeaderPar: The target purchase receipt header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab38ToTab122(Record Purchase Header, Record Purch. Inv. Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase header to a purchase invoice header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab122(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchInvHeaderPar: Record "Purch. Inv. Header"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchInvHeaderPar: The target purchase invoice header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab38ToTab124(Record Purchase Header, Record Purch. Cr. Memo Hdr., Boolean) :
Summary: Event is raised before copying additional table data from a purchase header to a purchase credit memo header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab124(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchCrMemoHdrPar: Record "Purch. Cr. Memo Hdr."; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchCrMemoHdrPar: The target purchase credit memo header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab38ToTab6650(Record Purchase Header, Record Return Shipment Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase header to a return shipment header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab6650(FromPurchaseHeaderPar: Record "Purchase Header"; ToReturnShipmentHeaderPar: Record "Return Shipment Header"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToReturnShipmentHeaderPar: The target return shipment header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab38ToTab5109(Record Purchase Header, Record Purchase Header Archive, Boolean) :
Summary: Event is raised before copying additional table data from a purchase header to a purchase header archive.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab38ToTab5109(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchaseHeaderArchivePar: Record "Purchase Header Archive"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchaseHeaderArchivePar: The target purchase header archive.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab39(Record Purchase Line, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from one purchase line to another.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab39(FromPurchaseLinePar: Record "Purchase Line"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab121(Record Purchase Line, Record Purch. Rcpt. Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line to a purchase receipt line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab121(FromPurchaseLinePar: Record "Purchase Line"; ToPurchRcptLinePar: Record "Purch. Rcpt. Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchRcptLinePar: The target purchase receipt line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab123(Record Purchase Line, Record Purch. Inv. Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line to a purchase invoice line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab123(FromPurchaseLinePar: Record "Purchase Line"; ToPurchInvLinePar: Record "Purch. Inv. Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchInvLinePar: The target purchase invoice line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab125(Record Purchase Line, Record Purch. Cr. Memo Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line to a purchase credit memo line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab125(FromPurchaseLinePar: Record "Purchase Line"; ToPurchCrMemoLinePar: Record "Purch. Cr. Memo Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchCrMemoLinePar: The target purchase credit memo line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab6651(Record Purchase Line, Record Return Shipment Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line to a return shipment line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab6651(FromPurchaseLinePar: Record "Purchase Line"; ToReturnShipmentLinePar: Record "Return Shipment Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToReturnShipmentLinePar: The target return shipment line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab39ToTab5110(Record Purchase Line, Record Purchase Line Archive, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line to a purchase line archive.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab39ToTab5110(FromPurchaseLinePar: Record "Purchase Line"; ToPurchaseLineArchivePar: Record "Purchase Line Archive"; var IsHandled: Boolean):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchaseLineArchivePar: The target purchase line archive.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab120ToTab38(Record Purch. Rcpt. Header, Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase receipt header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab120ToTab38(FromPurchRcptHeaderPar: Record "Purch. Rcpt. Header"; ToPurchaseHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromPurchRcptHeaderPar: The source purchase receipt header.ToPurchaseHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab121ToTab39(Record Purch. Rcpt. Line, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase receipt line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab121ToTab39(FromPurchRcptLinePar: Record "Purch. Rcpt. Line"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromPurchRcptLinePar: The source purchase receipt line.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab122ToTab38(Record Purch. Inv. Header, Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase invoice header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab122ToTab38(FromPurchInvHeaderPar: Record "Purch. Inv. Header"; ToPurchaseHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromPurchInvHeaderPar: The source purchase invoice header.ToPurchaseHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab123ToTab39(Record Purch. Inv. Line, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase invoice line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab123ToTab39(FromPurchInvLinePar: Record "Purch. Inv. Line"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromPurchInvLinePar: The source purchase invoice line.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab124ToTab38(Record Purch. Cr. Memo Hdr., Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase credit memo header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab124ToTab38(FromPurchCrMemoHdrPar: Record "Purch. Cr. Memo Hdr."; toPurchHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromPurchCrMemoHdrPar: The source purchase credit memo header.toPurchHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab125ToTab39(Record Purch. Cr. Memo Line, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase credit memo line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab125ToTab39(FromPurchCrMemoLinePar: Record "Purch. Cr. Memo Line"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromPurchCrMemoLinePar: The source purchase credit memo line.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab6650ToTab38(Record Return Shipment Header, Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from a return shipment header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab6650ToTab38(FromReturnShipmentHeaderPar: Record "Return Shipment Header"; ToPurchaseHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromReturnShipmentHeaderPar: The source return shipment header.ToPurchaseHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab6651ToTab39(Record Return Shipment Line, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from a return shipment line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab6651ToTab39(FromReturnShipmentLinePar: Record "Return Shipment Line"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromReturnShipmentLinePar: The source return shipment line.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeCopyAddedTablesTab5109ToTab38(Record Purchase Header Archive, Record Purchase Header, Boolean) :
Summary: Event is raised before copying additional table data from a purchase header archive back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab5109ToTab38(FromPurchaseHeaderArchivePar: Record "Purchase Header Archive"; ToPurchaseHeaderPar: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
FromPurchaseHeaderArchivePar: The source purchase header archive.ToPurchaseHeaderPar: The target purchase header.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnBeforeShowPurchDocTextLines(Enum Purchase Document Type, Code[20], Integer, Enum KVSKBATextPosition, Boolean) :
[IntegrationEvent(false, false)]
local procedure OnBeforeShowPurchDocTextLines(PurchaseDocumentType: Enum "Purchase Document Type"; DocNo: Code[20]; DocLineNo: Integer; KVSKBATextPosition: Enum "KVSKBATextPosition"; var IsHandled: Boolean):
OnBeforeCopyAddedTablesTab5110ToTab39(Record Purchase Line Archive, Record Purchase Line, Boolean) :
Summary: Event is raised before copying additional table data from a purchase line archive back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeCopyAddedTablesTab5110ToTab39(FromPurchaseLineArchivePar: Record "Purchase Line Archive"; ToPurchaseLinePar: Record "Purchase Line"; var IsHandled: Boolean):
Parameters:
FromPurchaseLineArchivePar: The source purchase line archive.ToPurchaseLinePar: The target purchase line.IsHandled: Set to true to skip the default copy logic.
Remarks: Set IsHandled to true to replace the default copy logic with a custom implementation.
OnCopyAddedTablesTab38ToTab38(Record Purchase Header, Record Purchase Header) :
Summary: Event is raised to copy additional table data from one purchase header to another.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab38(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchaseHeaderPar: Record "Purchase Header"):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchaseHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom fields when a purchase header is duplicated.
OnCopyAddedTablesTab38ToTab120(Record Purchase Header, Record Purch. Rcpt. Header) :
Summary: Event is raised to copy additional table data from a purchase header to a purchase receipt header during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab120(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchRcptHeaderPar: Record "Purch. Rcpt. Header"):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchRcptHeaderPar: The target purchase receipt header.
Remarks: Subscribe to this event to copy custom header fields to the posted receipt.
OnCopyAddedTablesTab38ToTab122(Record Purchase Header, Record Purch. Inv. Header) :
Summary: Event is raised to copy additional table data from a purchase header to a purchase invoice header during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab122(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchInvHeaderPar: Record "Purch. Inv. Header"):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchInvHeaderPar: The target purchase invoice header.
Remarks: Subscribe to this event to copy custom header fields to the posted invoice.
OnCopyAddedTablesTab38ToTab124(Record Purchase Header, Record Purch. Cr. Memo Hdr.) :
Summary: Event is raised to copy additional table data from a purchase header to a purchase credit memo header during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab124(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchCrMemoHdrPar: Record "Purch. Cr. Memo Hdr."):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchCrMemoHdrPar: The target purchase credit memo header.
Remarks: Subscribe to this event to copy custom header fields to the posted credit memo.
OnCopyAddedTablesTab38ToTab6650(Record Purchase Header, Record Return Shipment Header) :
Summary: Event is raised to copy additional table data from a purchase header to a return shipment header during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab6650(FromPurchaseHeaderPar: Record "Purchase Header"; ToReturnShipmentHeaderPar: Record "Return Shipment Header"):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToReturnShipmentHeaderPar: The target return shipment header.
Remarks: Subscribe to this event to copy custom header fields to the posted return shipment.
OnCopyAddedTablesTab38ToTab5109(Record Purchase Header, Record Purchase Header Archive) :
Summary: Event is raised to copy additional table data from a purchase header to a purchase header archive.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab38ToTab5109(FromPurchaseHeaderPar: Record "Purchase Header"; ToPurchaseHeaderArchivePar: Record "Purchase Header Archive"):
Parameters:
FromPurchaseHeaderPar: The source purchase header.ToPurchaseHeaderArchivePar: The target purchase header archive.
Remarks: Subscribe to this event to copy custom header fields when archiving a purchase document.
OnCopyAddedTablesTab39ToTab39(Record Purchase Line, Record Purchase Line) :
Summary: Event is raised to copy additional table data from one purchase line to another.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab39(FromPurchaseLinePar: Record "Purchase Line"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when a purchase line is duplicated.
OnCopyAddedTablesTab39ToTab121(Record Purchase Line, Record Purch. Rcpt. Line) :
Summary: Event is raised to copy additional table data from a purchase line to a purchase receipt line during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab121(FromPurchaseLinePar: Record "Purchase Line"; ToPurchRcptLinePar: Record "Purch. Rcpt. Line"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchRcptLinePar: The target purchase receipt line.
Remarks: Subscribe to this event to copy custom line fields to the posted receipt line.
OnCopyAddedTablesTab39ToTab123(Record Purchase Line, Record Purch. Inv. Line) :
Summary: Event is raised to copy additional table data from a purchase line to a purchase invoice line during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab123(FromPurchaseLinePar: Record "Purchase Line"; ToPurchInvLinePar: Record "Purch. Inv. Line"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchInvLinePar: The target purchase invoice line.
Remarks: Subscribe to this event to copy custom line fields to the posted invoice line.
OnCopyAddedTablesTab39ToTab125(Record Purchase Line, Record Purch. Cr. Memo Line) :
Summary: Event is raised to copy additional table data from a purchase line to a purchase credit memo line during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab125(FromPurchaseLinePar: Record "Purchase Line"; ToPurchCrMemoLinePar: Record "Purch. Cr. Memo Line"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchCrMemoLinePar: The target purchase credit memo line.
Remarks: Subscribe to this event to copy custom line fields to the posted credit memo line.
OnCopyAddedTablesTab39ToTab6651(Record Purchase Line, Record Return Shipment Line) :
Summary: Event is raised to copy additional table data from a purchase line to a return shipment line during posting.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab6651(FromPurchaseLinePar: Record "Purchase Line"; ToReturnShipmentLinePar: Record "Return Shipment Line"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToReturnShipmentLinePar: The target return shipment line.
Remarks: Subscribe to this event to copy custom line fields to the posted return shipment line.
OnCopyAddedTablesTab39ToTab5110(Record Purchase Line, Record Purchase Line Archive) :
Summary: Event is raised to copy additional table data from a purchase line to a purchase line archive.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab39ToTab5110(FromPurchaseLinePar: Record "Purchase Line"; ToPurchaseLineArchivePar: Record "Purchase Line Archive"):
Parameters:
FromPurchaseLinePar: The source purchase line.ToPurchaseLineArchivePar: The target purchase line archive.
Remarks: Subscribe to this event to copy custom line fields when archiving a purchase document line.
OnCopyAddedTablesTab120ToTab38(Record Purch. Rcpt. Header, Record Purchase Header) :
Summary: Event is raised to copy additional table data from a purchase receipt header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab120ToTab38(FromPurchRcptHeaderPar: Record "Purch. Rcpt. Header"; ToPurchaseHeaderPar: Record "Purchase Header"):
Parameters:
FromPurchRcptHeaderPar: The source purchase receipt header.ToPurchaseHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom header fields when recreating a purchase document from a receipt.
OnCopyAddedTablesTab121ToTab39(Record Purch. Rcpt. Line, Record Purchase Line) :
Summary: Event is raised to copy additional table data from a purchase receipt line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab121ToTab39(FromPurchRcptLinePar: Record "Purch. Rcpt. Line"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromPurchRcptLinePar: The source purchase receipt line.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when recreating a purchase document from a receipt line.
OnCopyAddedTablesTab122ToTab38(Record Purch. Inv. Header, Record Purchase Header) :
Summary: Event is raised to copy additional table data from a purchase invoice header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab122ToTab38(FromPurchInvHeaderPar: Record "Purch. Inv. Header"; ToPurchaseHeaderPar: Record "Purchase Header"):
Parameters:
FromPurchInvHeaderPar: The source purchase invoice header.ToPurchaseHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom header fields when recreating a purchase document from a posted invoice.
OnCopyAddedTablesTab123ToTab39(Record Purch. Inv. Line, Record Purchase Line) :
Summary: Event is raised to copy additional table data from a purchase invoice line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab123ToTab39(FromPurchInvLinePar: Record "Purch. Inv. Line"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromPurchInvLinePar: The source purchase invoice line.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when recreating a purchase document from a posted invoice line.
OnCopyAddedTablesTab124ToTab38(Record Purch. Cr. Memo Hdr., Record Purchase Header) :
Summary: Event is raised to copy additional table data from a purchase credit memo header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab124ToTab38(FromPurchCrMemoHdrPar: Record "Purch. Cr. Memo Hdr."; toPurchHeaderPar: Record "Purchase Header"):
Parameters:
FromPurchCrMemoHdrPar: The source purchase credit memo header.toPurchHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom header fields when recreating a purchase document from a posted credit memo.
OnCopyAddedTablesTab125ToTab39(Record Purch. Cr. Memo Line, Record Purchase Line) :
Summary: Event is raised to copy additional table data from a purchase credit memo line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab125ToTab39(FromPurchCrMemoLinePar: Record "Purch. Cr. Memo Line"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromPurchCrMemoLinePar: The source purchase credit memo line.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when recreating a purchase document from a posted credit memo line.
OnCopyAddedTablesTab6650ToTab38(Record Return Shipment Header, Record Purchase Header) :
Summary: Event is raised to copy additional table data from a return shipment header back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab6650ToTab38(FromReturnShipmentHeaderPar: Record "Return Shipment Header"; ToPurchaseHeaderPar: Record "Purchase Header"):
Parameters:
FromReturnShipmentHeaderPar: The source return shipment header.ToPurchaseHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom header fields when recreating a purchase document from a return shipment.
OnCopyAddedTablesTab6651ToTab39(Record Return Shipment Line, Record Purchase Line) :
Summary: Event is raised to copy additional table data from a return shipment line back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab6651ToTab39(FromReturnShipmentLinePar: Record "Return Shipment Line"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromReturnShipmentLinePar: The source return shipment line.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when recreating a purchase document from a return shipment line.
OnCopyAddedTablesTab5109ToTab38(Record Purchase Header Archive, Record Purchase Header) :
Summary: Event is raised to copy additional table data from a purchase header archive back to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab5109ToTab38(FromPurchaseHeaderArchivePar: Record "Purchase Header Archive"; ToPurchaseHeaderPar: Record "Purchase Header"):
Parameters:
FromPurchaseHeaderArchivePar: The source purchase header archive.ToPurchaseHeaderPar: The target purchase header.
Remarks: Subscribe to this event to copy custom header fields when restoring a purchase document from an archive.
OnCopyAddedTablesTab5110ToTab39(Record Purchase Line Archive, Record Purchase Line) :
Summary: Event is raised to copy additional table data from a purchase line archive back to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnCopyAddedTablesTab5110ToTab39(FromPurchaseLineArchivePar: Record "Purchase Line Archive"; ToPurchaseLinePar: Record "Purchase Line"):
Parameters:
FromPurchaseLineArchivePar: The source purchase line archive.ToPurchaseLinePar: The target purchase line.
Remarks: Subscribe to this event to copy custom line fields when restoring a purchase document line from an archive.
OnCreatePurchHeaderForSalesOrderBeforePurchHeaderModify(Record Purchase Header, Record Sales Header) :
Summary: Event is raised just before modifying the purchase header during creation of a purchase order from a sales order.
[IntegrationEvent(false, false)]
local procedure OnCreatePurchHeaderForSalesOrderBeforePurchHeaderModify(var PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"):
Parameters:
PurchaseHeader: The purchase header about to be modified.SalesHeader: The source sales order.
Remarks: Subscribe to this event to apply additional changes to the purchase header before it is saved.
OnDeleteAddedTablesTab38(Record Purchase Header) :
Summary: Event is raised to delete additional table data related to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnDeleteAddedTablesTab38(PurchaseHeaderPar: Record "Purchase Header"):
Parameters:
PurchaseHeaderPar: The purchase header being deleted.
Remarks: Subscribe to this event to delete custom related records when a purchase header is deleted.
OnDeleteAddedTablesTab39(Record Purchase Line) :
Summary: Event is raised to delete additional table data related to a purchase line.
[IntegrationEvent(false, false)]
local procedure OnDeleteAddedTablesTab39(PurchaseLinePar: Record "Purchase Line"):
Parameters:
PurchaseLinePar: The purchase line being deleted.
Remarks: Subscribe to this event to delete custom related records when a purchase line is deleted.
OnGetSpecialNoteSetCommentLineFilter(Record Comment Line) :
Summary: Event is raised to set additional filters on the Comment Line record when retrieving special notes.
[IntegrationEvent(false, false)]
local procedure OnGetSpecialNoteSetCommentLineFilter(var CommentLine: Record "Comment Line"):
Parameters:
CommentLine: The Comment Line record on which additional filters can be set.
Remarks: Subscribe to this event to apply custom filters that restrict which comment lines are treated as special notes.
OnBeforeTestAdditionalTableRelationatT39(Record Purchase Line, Boolean) :
Summary: Event is raised before testing additional table relations on a purchase line (Table 39).
[IntegrationEvent(false, false)]
local procedure OnBeforeTestAdditionalTableRelationatT39(var PurchaseLine: Record "Purchase Line"; var Handled: Boolean):
Parameters:
PurchaseLine: The purchase line being validated.Handled: Set to true to skip the default table relation test.
Remarks: Set Handled to true to replace the default table relation validation with custom logic.
OnSetPurchLinePriceOriginFromPurchPriceOnBeforePurchPriceTypeCaseElse(Record Purchase Line, Record KVSKBAPurchasePrice, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before the case-else branch when setting the purchase line price origin from a purchase price record.
[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnSetPurchLinePriceOriginFromPurchPriceOnBeforePurchPriceTypeCaseElse(var PurchaseLine: Record "Purchase Line"; PurchasePrice: Record "KVSKBAPurchasePrice"; var Ishandled: Boolean):
Parameters:
PurchaseLine: The purchase line being updated.PurchasePrice: The purchase price record providing the price origin.Ishandled: Set to true to skip the default case-else processing.
Remarks: This event is obsolete. The price calculation needs a redesign due to standard changes.
OnMessageExistBlankOrderPurchaseLineOnSetFilter(Record Purchase Line, Record Purchase Line) :
Summary: Event is raised to set additional filters on the blanket purchase order line when checking for existing blanket orders.
[IntegrationEvent(false, false)]
local procedure OnMessageExistBlankOrderPurchaseLineOnSetFilter(var BlanketOrderPurchaseLine: Record "Purchase Line"; SourcePurchaseLine: Record "Purchase Line"):
Parameters:
BlanketOrderPurchaseLine: The blanket order purchase line record on which filters can be set.SourcePurchaseLine: The source purchase line triggering the blanket order check.
Remarks: Subscribe to this event to apply custom filters that restrict which blanket order lines are considered as matches.
OnAfterCheckPosNoInPurchLine(Record Purchase Header, Option) :
Summary: Event is raised after checking the completeness of position numbers in purchase lines.
[IntegrationEvent(false, false)]
local procedure OnAfterCheckPosNoInPurchLine(PurchaseHeader: Record "Purchase Header"; var Result: Option):
Parameters:
PurchaseHeader: The purchase header whose lines were checked.Result: The check result: All (all lines have pos. no.), None (no lines have pos. no.), or Some (only some lines have pos. no.).
Remarks: Subscribe to this event to react to or override the position number completeness result.
OnBeforeTestAndUpdatePostingCodeTab38(Record Purchase Header, Record Purchase Header, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised before testing and updating the posting code on a purchase header.
[Obsolete('The Posting code has been removed, so the event can no longer be called up.', '28.0')]
[IntegrationEvent(false, false)]
local procedure OnBeforeTestAndUpdatePostingCodeTab38(var PurchaseHeader: Record "Purchase Header"; xPurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header being validated.xPurchaseHeader: The previous state of the purchase header (before modification).IsHandled: Set to true to skip the default posting code test and update.
Remarks: This event is obsolete. The posting code has been removed and this event can no longer be raised.
OnBeforeTypeAndNoAreStatedPurchaseLine(Record Purchase Line, Boolean, Boolean) :
Summary: Event is raised before checking whether a type and number are stated on a purchase line.
[IntegrationEvent(false, false)]
local procedure OnBeforeTypeAndNoAreStatedPurchaseLine(PurchaseLine: Record "Purchase Line"; var ReturnValue: Boolean; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line being checked.ReturnValue: Set this to override the return value of the check.IsHandled: Set to true to skip the default type and number check.
Remarks: Set IsHandled to true and assign ReturnValue to provide a custom result for the type-and-number check.
OnBeforeSetPaymentTermsFromPurchaseOrderType(Record Purchase Header, Boolean) :
Summary: Event is raised before setting payment terms derived from the purchase order type on a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetPaymentTermsFromPurchaseOrderType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header for which payment terms are being set.IsHandled: Set to true to skip the default payment terms assignment.
Remarks: Set IsHandled to true to prevent the default payment terms logic from executing.
OnAfterCalculatePurchaseOrderConfirmationLineForPurchLine(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine) :
Summary: Event is raised after calculating a "Purchase Order Confirmation" line for a given "Purchase Line".
[IntegrationEvent(false, false)]
local procedure OnAfterCalculatePurchaseOrderConfirmationLineForPurchLine(PurchaseLine: Record "Purchase Line"; ConfirmationNo: Code[20]; DocumentDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"):
Parameters:
PurchaseLine: Source Record "Purchase Line"ConfirmationNo: Confirmation No. that was usedDocumentDate: Document Date that was usedPurchOrderConfLine: New "Purchase Order Confirmation" line that was calculated
OnAfterCalcPurchOrderConfLine4PurchLi(Record Purchase Line, Code[20], Date, Record KVSKBAPurchOrderConfLine) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Event is raised after calculating a purchase order confirmation line for a purchase line.
[Obsolete('Event is obsolete, use OnAfterCalculatePurchaseOrderConfirmationLineForPurchLine instead', '26.5')]
[IntegrationEvent(false, false)]
local procedure OnAfterCalcPurchOrderConfLine4PurchLi(PurchaseLine: Record "Purchase Line"; ConfNo: Code[20]; ConfDate: Date; var PurchOrderConfLine: Record "KVSKBAPurchOrderConfLine"):
Parameters:
PurchaseLine: The source purchase line.ConfNo: The confirmation number that was used.ConfDate: The confirmation date that was used.PurchOrderConfLine: The purchase order confirmation line that was calculated.
Remarks: This event is obsolete. Use OnAfterCalculatePurchaseOrderConfirmationLineForPurchLine instead.
OnAfterSetAssignedUserID(Record Purchase Header, Boolean) :
Summary: Event is raised after assigning the user ID to a purchase header.
[IntegrationEvent(false, false)]
local procedure OnAfterSetAssignedUserID(var PurchaseHeader: Record "Purchase Header"; OnInsertMode: Boolean):
Parameters:
PurchaseHeader: The purchase header to which the user ID was assigned.OnInsertMode: True if the assignment occurred during record insertion; false during modification.
Remarks: Subscribe to this event to execute custom logic after the assigned user ID has been set.
OnBeforeAddSpecialOrderToAddress(Record Purchase Header, Record Service Header, Boolean, Boolean) :
Summary: Event is raised before adding special order address data to a purchase header from a service order.
[IntegrationEvent(false, false)]
local procedure OnBeforeAddSpecialOrderToAddress(var PurchaseHeader: Record "Purchase Header"; var ServiceHeader: Record "Service Header"; ShowError: Boolean; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header receiving the address data.ServiceHeader: The service order providing the address data.ShowError: True if an error should be shown when no valid address is found.IsHandled: Set to true to skip the default address assignment.
Remarks: Set IsHandled to true to replace the default special order address logic with a custom implementation.
OnCreatePurchaseHeaderForServiceOrderBeforePurchHeaderModify(Record Purchase Header, Record Service Header) :
Summary: Event is raised just before modifying the purchase header during creation of a purchase order from a service order.
[IntegrationEvent(false, false)]
local procedure OnCreatePurchaseHeaderForServiceOrderBeforePurchHeaderModify(var PurchaseHeader: Record "Purchase Header"; ServiceHeader: Record "Service Header"):
Parameters:
PurchaseHeader: The purchase header about to be modified.ServiceHeader: The source service order.
Remarks: Subscribe to this event to apply additional changes to the purchase header before it is saved.
OnAfterAddSpecialOrderToAddress(Record Purchase Header, Record Service Header, Boolean) :
Summary: Event is raised after adding special order address data to a purchase header from a service order.
[IntegrationEvent(false, false)]
local procedure OnAfterAddSpecialOrderToAddress(var PurchaseHeader: Record "Purchase Header"; var ServiceHeader: Record "Service Header"; ShowError: Boolean):
Parameters:
PurchaseHeader: The purchase header that received the address data.ServiceHeader: The service order that provided the address data.ShowError: True if an error was shown when no valid address was found.
Remarks: Subscribe to this event to execute custom logic after the special order address has been applied.
OnBeforeCreatePurchHeaderForSalesOrder(Record Purchase Header, Code[20], Record Sales Header, Option, Boolean) :
Summary: Event is raised before creating a purchase header linked to a sales order.
[IntegrationEvent(false, false)]
local procedure OnBeforeCreatePurchHeaderForSalesOrder(var PurchaseHeader: Record "Purchase Header"; VendorNo: Code[20]; SalesHeader: Record "Sales Header"; OrderType: Option; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header being initialized.VendorNo: The vendor number to assign to the purchase header.SalesHeader: The source sales order.OrderType: The order type (Normal, Drop Shipment, Special Order).IsHandled: Set to true to skip the default purchase header creation.
Remarks: Set IsHandled to true to replace the default purchase header creation logic with a custom implementation.
OnBeforeCreatePurchaseHeaderForServiceOrder(Record Purchase Header, Code[20], Record Service Header, Option, Boolean) :
Summary: Event is raised before creating a purchase header linked to a service order.
[IntegrationEvent(false, false)]
local procedure OnBeforeCreatePurchaseHeaderForServiceOrder(var PurchaseHeader: Record "Purchase Header"; VendorNo: Code[20]; ServiceHeader: Record "Service Header"; OrderType: Option; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header being initialized.VendorNo: The vendor number to assign to the purchase header.ServiceHeader: The source service order.OrderType: The order type (Normal, Drop Shipment, Special Order).IsHandled: Set to true to skip the default purchase header creation.
Remarks: Set IsHandled to true to replace the default purchase header creation logic with a custom implementation.
OnRunCalcPosNoInPurchLinesOnAfterFilterPurchaseLine(Record Purchase Line) :
Summary: Event is raised after filtering the purchase lines before running the position number calculation.
[IntegrationEvent(false, false)]
local procedure OnRunCalcPosNoInPurchLinesOnAfterFilterPurchaseLine(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line record with applied filters.
Remarks: Subscribe to this event to apply additional filters to the purchase lines before the position number is recalculated.
OnBeforeCheckDateConflictsPurchaseLines(Record Purchase Line, Boolean, Date, Integer, Integer, Boolean, Boolean) :
Summary: Event is raised before checking date conflicts in purchase lines after a delivery date confirmation.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckDateConflictsPurchaseLines(var PurchaseLine: Record "Purchase Line"; DeliveryDateConfirmed: Boolean; ConfirmedDeliveryDate: Date; var AffectedLines: Integer; var LineNoArray: Integer; var MustDeleteConfirm: Boolean; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line record with applied filters.DeliveryDateConfirmed: True if the delivery date was confirmed by the user.ConfirmedDeliveryDate: The confirmed delivery date.AffectedLines: The number of purchase lines affected by the date conflict.LineNoArray: An array containing the line numbers of the affected purchase lines.MustDeleteConfirm: True if the user must confirm deletion of conflicting lines.IsHandled: Set to true to skip the default date conflict check.
Remarks: Set IsHandled to true to replace the default date conflict handling with a custom implementation.
OnBeforeCheckMinimumAmounts(Record Purchase Header, Boolean) :
Summary: Event is raised before checking minimum amount thresholds on a purchase header.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckMinimumAmounts(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
Parameters:
PurchaseHeader: The purchase header being validated.IsHandled: Set to true to skip the default minimum amount check.
Remarks: Set IsHandled to true to prevent the default minimum amount validation from executing.