KVSKBAMasterDoc#
Procedures#
FindFirstHeader(Record KVSKBADocumentHeaderBuffer) : Boolean#
Summary: Retrieves the first document header from the temporary buffer.
procedure FindFirstHeader(var TempDocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"): Boolean
Parameters:
TempDocumentHeaderBuffer: Output parameter for the found document header record.
Returns: True if a record was found, false otherwise.
Remarks: Starts the search for document headers in the temporary buffer.
FindNextHeader(Record KVSKBADocumentHeaderBuffer) : Boolean#
Summary: Retrieves the next document header from the temporary buffer.
procedure FindNextHeader(var TempDocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"): Boolean
Parameters:
TempDocumentHeaderBuffer: Output parameter for the found document header record.
Returns: True if a record was found, false otherwise.
Remarks: Continues the search from the last found document header.
GetTempDocHeaderBuffer(Record KVSKBADocumentHeaderBuffer) :#
Summary: Copies the temporary document header buffer to the output parameter.
procedure GetTempDocHeaderBuffer(var OutDocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
Parameters:
OutDocumentHeaderBuffer: Temporary record to receive the copy of the buffer.
Remarks: Copies the current global document header buffer to the provided temporary record.
FindFirstDataItem(Record KVSKBADocumentDataItemBuffer, Record KVSKBADocumentHeaderBuffer, Integer) : Boolean#
Summary: Retrieves the first data item for a specific document header and copy loop.
procedure FindFirstDataItem(var TempDocumentDataItemBuffer: Record "KVSKBADocumentDataItemBuffer" temporary; TempDocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; CopyLoopNo: Integer): Boolean
Parameters:
TempDocumentDataItemBuffer: Temporary buffer for the found data item.TempDocumentHeaderBuffer: Document header to filter data items.CopyLoopNo: Copy loop number for the data item.
Returns: True if a record was found, false otherwise.
Remarks: Searches for data items matching the specified document header and copy loop number.
FindNextDataItem(Record KVSKBADocumentDataItemBuffer, Record KVSKBADocumentHeaderBuffer) : Boolean#
Summary: Retrieves the next data item from the temporary buffer.
procedure FindNextDataItem(var TempDocumentDataItemBuffer: Record "KVSKBADocumentDataItemBuffer" temporary; TempDocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"): Boolean
Parameters:
TempDocumentDataItemBuffer: Temporary buffer for the found data item.TempDocumentHeaderBuffer: Document header context for the data item.
Returns: True if a record was found, false otherwise.
Remarks: Continues the search from the last found data item.
FindStaticData(Record KVSKBADocumentDataItemBuffer) : Boolean#
Summary: Retrieves static data item records from the temporary buffer.
procedure FindStaticData(var TempDocumentDataItemBuffer: Record "KVSKBADocumentDataItemBuffer" temporary): Boolean
Parameters:
TempDocumentDataItemBuffer: Temporary buffer for the found static data.
Returns: True if static data was found, false otherwise.
Remarks: Searches for data items of type StaticData.
GetDimText(Integer) : Text#
Summary: Retrieves dimension information as formatted text for a given dimension set.
procedure GetDimText(DimensionSetID: Integer): Text
Parameters:
DimensionSetID: The dimension set ID to retrieve.
Returns: Formatted text containing dimension codes and values.
Remarks: Returns empty string if ShowInternalInfo is false or no dimensions are found.
InitMaster(Integer, Integer, Boolean, Boolean) :#
Summary: Initializes the MasterDoc codeunit with report parameters.
procedure InitMaster(ReportID: Integer; NoOfCopies: Integer; PrintOnNote: Boolean; ShowInternalInfo: Boolean):
Parameters:
ReportID: ID of the report to be generated.NoOfCopies: Number of copies to print.PrintOnNote: Whether to print on notepaper.ShowInternalInfo: Whether to show internal information.
Remarks: Clears all temporary buffers and initializes company information and layout settings.
GetNoOfCopies() : Integer#
Summary: Retrieves the number of copies to be printed.
procedure GetNoOfCopies(): Integer
Returns: Number of copies as integer.
Remarks: Returns the global number of copies set during initialization.
SetAdditionalNoOfCopies(Integer) : Integer#
Summary: Adds additional copies to the current number of copies.
procedure SetAdditionalNoOfCopies(AdditionalNoOfCopies: Integer): Integer
Parameters:
AdditionalNoOfCopies: Number of additional copies to add.
Returns: Updated total number of copies.
Remarks: If the result would be negative, it is set to 0.
InitCustomFields() :#
Summary: Initializes and clears the custom fields list.
procedure InitCustomFields():
Remarks: Clears the global custom master document field data and header field data.
AddCustomFieldValue(Text, Text) :#
Summary: Adds or modifies a custom field value in the custom field data list.
procedure AddCustomFieldValue(LabelText: Text; ValueText: Text):
Parameters:
LabelText: The label/key for the custom field.ValueText: The value for the custom field.
Remarks: Adds or updates the specified label and value in the global custom master document field data.
GetCustomFieldValue(Text) : Text#
Summary: Retrieves a custom field value from the custom field data list.
procedure GetCustomFieldValue(LabelText: Text): Text
Parameters:
LabelText: The label/key for the custom field.
Returns: The value of the custom field.
Remarks: Retrieves the value associated with the specified label from the global custom master document field data.
AddDocHeader(Record KVSKBADocumentHeaderBuffer) :#
Summary: Adds a new document header to the temporary buffers.
procedure AddDocHeader(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
Parameters:
DocumentHeaderBuffer: The document header to add.
Remarks: Builds field data list and inserts custom fields before adding to buffer.
UpdateDocHeader(Record KVSKBADocumentHeaderBuffer) :#
Summary: Updates an existing document header in the temporary buffers.
procedure UpdateDocHeader(var DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
Parameters:
DocumentHeaderBuffer: The document header to update.
Remarks: If the header doesn't exist, it will be added instead.
AddStaticData(Record KVSKBADocumentHeaderBuffer) :#
Summary: Adds static data entry to the data item buffer.
procedure AddStaticData(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
Parameters:
DocumentHeaderBuffer: Document header context for the static data.
Remarks: Includes layout settings like font, logo position, and print options.
SetCopyLoopNo(Integer) :#
Summary: Sets the current copy loop number.
procedure SetCopyLoopNo(LoopNo: Integer):
Parameters:
LoopNo: The copy loop number to set.
Remarks: Updates the global master document data with the specified copy loop number.
AddDataItemLine(Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentDataItemBuffer) :#
Summary: Adds a generic data item line to the data item buffer.
procedure AddDataItemLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; var TempDocumentDataItemBuffer: Record "KVSKBADocumentDataItemBuffer"):
Parameters:
DocumentHeaderBuffer: Document header context.TempDocumentDataItemBuffer: Data item to add.
Remarks: Transfers fields and blob data from the provided data item buffer to the temporary global buffer before inserting.
AddDataItemLineText(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentDataItemType, Enum KVSKBADocumentTableType, Enum KVSKBADocumentLineType, Text, Codeunit KVSKBAMasterDocFieldData) :#
procedure AddDataItemLineText(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DataItemType: Enum "KVSKBADocumentDataItemType"; TableType: Enum "KVSKBADocumentTableType"; LineType: Enum "KVSKBADocumentLineType"; TextValue: Text; var FieldDataList: Codeunit "KVSKBAMasterDocFieldData"):
AddDocHeading(Record KVSKBADocumentHeaderBuffer, Option, Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100]) :#
Summary: Adds a document heading line to the data item buffer.
procedure AddDocHeading(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; HeadingType: Option; Column1Value: Text[255]; Column1Format: Text[100]; Column2Value: Text[255]; Column2Format: Text[100]; Column3Value: Text[255]; Column3Format: Text[100]; Column4Value: Text[255]; Column4Format: Text[100]; Column5Value: Text[255]; Column5Format: Text[100]):
Parameters:
DocumentHeaderBuffer: Document header context.HeadingType: Type of heading (option).Column1Value: Value for column 1.Column1Format: Format for column 1.Column2Value: Value for column 2.Column2Format: Format for column 2.Column3Value: Value for column 3.Column3Format: Format for column 3.Column4Value: Value for column 4.Column4Format: Format for column 4.Column5Value: Value for column 5.Column5Format: Format for column 5.
Remarks: Adds a new heading line to the data item buffer.
AddDocHeadingWithHeadingEntryNo(Record KVSKBADocumentHeaderBuffer, Integer, Option, Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100]) :#
Summary: Adds a document heading line with a specific entry number.
procedure AddDocHeadingWithHeadingEntryNo(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; HeadingLineNo: Integer; HeadingType: Option; Column1Value: Text[255]; Column1Format: Text[100]; Column2Value: Text[255]; Column2Format: Text[100]; Column3Value: Text[255]; Column3Format: Text[100]; Column4Value: Text[255]; Column4Format: Text[100]; Column5Value: Text[255]; Column5Format: Text[100]):
Parameters:
DocumentHeaderBuffer: Document header context.HeadingLineNo: Entry number for the heading line.HeadingType: Type of heading (option).Column1Value: Value for column 1.Column1Format: Format for column 1.Column2Value: Value for column 2.Column2Format: Format for column 2.Column3Value: Value for column 3.Column3Format: Format for column 3.Column4Value: Value for column 4.Column4Format: Format for column 4.Column5Value: Value for column 5.Column5Format: Format for column 5.
Remarks: Allows positioning the heading at a specific location in the heading list.
GetDocHeadingEntryNoByCaption(Record KVSKBADocumentHeaderBuffer, Text[100]) : Integer#
Summary: Retrieves the entry number of a heading by its caption.
procedure GetDocHeadingEntryNoByCaption(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; CaptionName: Text[100]): Integer
Parameters:
DocumentHeaderBuffer: Document header context.CaptionName: Caption to search for.
Returns: Entry number of the found heading, 0 if no entries exist, or last entry number if caption not found.
Remarks: Searches for a heading entry matching the specified caption. If no entries are found, returns 0. If entries exist but the caption is not found, returns the last entry number.
GetDocHeadingEntryNoByCaptionOrMinusOne(Record KVSKBADocumentHeaderBuffer, Text[100]) : Integer#
Summary: Retrieves Heading EntryNo of the given Caption. Returns 0, if no entries have been found. Returns -1 if there are entries, but not the searched one.
procedure GetDocHeadingEntryNoByCaptionOrMinusOne(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; CaptionName: Text[100]): Integer
Parameters:
DocumentHeaderBuffer: Document Header RecordCaptionName: Caption to search for
Returns: EntryNo of the found Heading Entry or -1 if not found
Remarks: Searches for a heading entry matching the specified caption. If no entries are found, returns 0. If entries exist but the caption is not found, returns -1.
UpdateDocHeadingEntry(Record KVSKBADocumentHeaderBuffer, Integer, Option, Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100], Text[255], Text[100]) : Boolean#
Summary: Updates a document heading entry.
procedure UpdateDocHeadingEntry(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; EntryNo: Integer; HeadingType: Option; Column1Value: Text[255]; Column1Format: Text[100]; Column2Value: Text[255]; Column2Format: Text[100]; Column3Value: Text[255]; Column3Format: Text[100]; Column4Value: Text[255]; Column4Format: Text[100]; Column5Value: Text[255]; Column5Format: Text[100]): Boolean
Parameters:
DocumentHeaderBuffer: Document header context.EntryNo: Entry number of the heading to update.HeadingType: Type of heading (option).Column1Value: Value for column 1.Column1Format: Format for column 1.Column2Value: Value for column 2.Column2Format: Format for column 2.Column3Value: Value for column 3.Column3Format: Format for column 3.Column4Value: Value for column 4.Column4Format: Format for column 4.Column5Value: Value for column 5.Column5Format: Format for column 5.
Returns: True if entry was found and updated, false otherwise.
Remarks: Updates the specified heading entry with new values and formats.
DeleteDocHeadingEntry(Record KVSKBADocumentHeaderBuffer, Integer) : Boolean#
Summary: Deletes a document heading entry.
procedure DeleteDocHeadingEntry(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; EntryNo: Integer): Boolean
Parameters:
DocumentHeaderBuffer: Document header context.EntryNo: Entry number of the heading to delete.
Returns: True if entry was found and deleted, false otherwise.
Remarks: Deletes the specified heading entry from the data item buffer.
AddDocHeaderLine(Record KVSKBADocumentHeaderBuffer, Text, Text, Option) :#
Summary: Adds a document header line to the data item buffer.
procedure AddDocHeaderLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; TextValue: Text; FormatText: Text; TextTypeOption: Option):
Parameters:
DocumentHeaderBuffer: Document header context.TextValue: Text content of the header line.FormatText: Format specification for the header line.TextTypeOption: Type of text (option).
Remarks: Adds a new document header line to the data item buffer.
AddDocLine_LongText(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Enum KVSKBADocumentLineType, Text, Text, Option) :#
Summary: Adds a formatted text line to the data item buffer.
procedure AddDocLine_LongText(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; TextValue: Text; FormatText: Text; TextTypeOption: Option):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Line number.DocumentLineType: Type of document line.TextValue: Text content.FormatText: Format specification.TextTypeOption: Type of text (option).
Remarks: Adds a new document line with long text to the data item buffer.
AddDocLine_LongTextDetail(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Integer, Enum KVSKBADocumentLineType, Text, Text, Option) :#
Summary: Adds a detail document line with detail line number to the data item buffer.
procedure AddDocLine_LongTextDetail(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; LineNoDetailLineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; TextValue: Text; FormatText: Text; TextTypeOption: Option):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Main line number.LineNoDetailLineNo: Detail line number.DocumentLineType: Type of document line.TextValue: Text content.FormatText: Format specification.TextTypeOption: Type of text (option).
Remarks: Used for service documents with detail lines.
AddDocLine_Text(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Enum KVSKBADocumentLineType, Text[250], Text) :#
Summary: Adds a standard text line to the data item buffer.
procedure AddDocLine_Text(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; TextValue: Text[250]; FormatText: Text):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Line number.DocumentLineType: Type of document line.TextValue: Text content (max 250 characters).FormatText: Format specification.
Remarks: Adds a new document line with short text to the data item buffer.
AddDocLine_TextDetail(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Integer, Enum KVSKBADocumentLineType, Text[250], Text) :#
Summary: Adds a detail text line to the data item buffer.
procedure AddDocLine_TextDetail(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; LineNoDetailLineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; TextValue: Text[250]; FormatText: Text):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Main line number.LineNoDetailLineNo: Detail line number.DocumentLineType: Type of document line.TextValue: Text content (max 250 characters).FormatText: Format specification.
Remarks: Used for service documents with detail lines.
AddDocLine(Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentLineBuffer) :#
Summary: Adds a document line to the data item buffer.
procedure AddDocLine(var DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; var DocumentLineBuffer: Record "KVSKBADocumentLineBuffer"):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentLineBuffer: Document line to add.
Remarks: Enables printing of needed captions based on line properties.
AddDocFooterLine(Record KVSKBADocumentHeaderBuffer, Text, Text, Option) :#
Summary: Adds a document footer line to the data item buffer.
procedure AddDocFooterLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; TextValue: Text; FormatText: Text; TextTypeOption: Option):
Parameters:
DocumentHeaderBuffer: Document header context.TextValue: Text content of the footer line.FormatText: Format specification.TextTypeOption: Type of text (option).
Remarks: Adds a new document footer line to the data item buffer.
AddDocPrepaymentLine(Record KVSKBADocumentLineBuffer) :#
Summary: Adds a prepayment line to the data item buffer.
procedure AddDocPrepaymentLine(DocLine: Record "KVSKBADocumentLineBuffer"):
Parameters:
DocLine: Document line buffer containing prepayment information.
Remarks: Adds a prepayment line to the data item buffer.
AddItemTrackingHeading(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Text[250], Text[50], Text[50], Text[30]) :#
Summary: Adds an item tracking heading line to the data item buffer.
procedure AddItemTrackingHeading(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; FormatText: Text[250]; LotNoCaption: Text[50]; SerialNoCaption: Text[50]; QuantityCaption: Text[30]):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Line number.FormatText: Format specification.LotNoCaption: Caption for lot number column.SerialNoCaption: Caption for serial number column.QuantityCaption: Caption for quantity column.
Remarks: Adds an item tracking heading line to the data item buffer.
AddItemTrackingHeading(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Integer, Text[250], Text[50], Text[50], Text[30]) :#
Summary: Add an item tracking heading line to DataItem buffer with Detail Line No.
procedure AddItemTrackingHeading(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DetailLineNo: Integer; FormatText: Text[250]; LotNoCaption: Text[50]; SerialNoCaption: Text[50]; QuantityCaption: Text[30]):
Parameters:
DocumentHeaderBuffer: Global printing infos as Record KVSKBADocumentHeaderBufferDocumentTableType: Type of printing Area as Enum KVSKBADocumentTableTypeLineNo: Line no. of the main line (Service Item Line No.)DetailLineNo: Detail Line no. of the main line (Service Line No.)FormatText: Defines the formatting to be printed as textLotNoCaption: Caption of Lot No. as TextSerialNoCaption: Caption of Serial No. as TextQuantityCaption: Caption of Quantity as Text
Remarks: Adds an item tracking heading line to DataItem buffer with Detail Line No.
AddItemTrackingLine(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Text[250], Code[20], Text[250], Code[20], Code[50], Code[50], Decimal, Text[50], Record Tracking Specification) :#
Summary: Add an item tracking line to DataItem buffer
procedure AddItemTrackingLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; FormatText: Text[250]; PositionNo: Code[20]; Description: Text[250]; ItemNo: Code[20]; LotNo: Code[50]; SerialNo: Code[50]; Quantity: Decimal; SortTrigger1: Text[50]; TempTrackingSpecification: Record "Tracking Specification" temporary):
Parameters:
DocumentHeaderBuffer: Global printing infos as Record KVSKBADocumentHeaderBufferDocumentTableType: Type of printing Area as Enum KVSKBADocumentTableTypeLineNo: Line no. of the main line (Service Item Line No.)FormatText: Defines the formatting to be printed as textPositionNo: Document Line Positionno as CodeDescription: Item Tracking Line Description as TextItemNo: Item Tracking Line Item No. as CodeLotNo: Lot No. as CodeSerialNo: Serial No. as CodeQuantity: Item Tracking Line Quantity as DecimalSortTrigger1: Sorting as TextTempTrackingSpecification: Record TrackingSpecification for more Information
Remarks: Adds an item tracking line to DataItem buffer
AddItemTrackingLine(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Integer, Text[250], Code[20], Text[250], Code[20], Code[50], Code[50], Decimal, Text[50], Record Tracking Specification) :#
Summary: Add an item tracking line to DataItem buffer
procedure AddItemTrackingLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DetailLineNo: Integer; FormatText: Text[250]; PositionNo: Code[20]; Description: Text[250]; ItemNo: Code[20]; LotNo: Code[50]; SerialNo: Code[50]; Quantity: Decimal; SortTrigger1: Text[50]; TempTrackingSpecification: Record "Tracking Specification" temporary):
Parameters:
DocumentHeaderBuffer: Global printing infos as Record KVSKBADocumentHeaderBufferDocumentTableType: Type of printing Area as Enum KVSKBADocumentTableTypeLineNo: Line no. of the main line (Service Item Line No.)DetailLineNo: Detail Line no. of the main line (Service Line No.)FormatText: Defines the formatting to be printed as textPositionNo: Document Line Positionno as CodeDescription: Item Tracking Line Description as TextItemNo: Item Tracking Line Item No. as CodeLotNo: Lot No. as CodeSerialNo: Serial No. as CodeQuantity: Item Tracking Line Quantity as DecimalSortTrigger1: Sorting as TextTempTrackingSpecification: Record TrackingSpecification for more Information
Remarks: Adds an item tracking line to DataItem buffer with Detail Line No.
CheckAndAddDocTextBuffer(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentLineType, Text, Text, Text, Text, Boolean, Boolean, Boolean) : Boolean#
Summary: Collects and summarizes document text lines and adds them to the data item buffer.
procedure CheckAndAddDocTextBuffer(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentLineType: Enum "KVSKBADocumentLineType"; LineFormat: Text; var TextBuffer: Text; TextValue: Text; FormattedText: Text; LastLine: Boolean; NewBlock: Boolean; HasFormattedText: Boolean): Boolean
Parameters:
DocumentHeaderBuffer: Document header context.DocumentLineType: Type of document line.LineFormat: Format specification.TextBuffer: Buffer for collecting text lines.TextValue: Current text line to add.FormattedText: Formatted text content.LastLine: Whether this is the last line.NewBlock: Whether to start a new block.HasFormattedText: Whether formatted text is present.
Returns: Always returns false.
Remarks: Ensures empty lines are printed when needed.
CheckAndAddLineTextBuffer(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Enum KVSKBADocumentLineType, Text, Text, Text, Text, Boolean, Boolean, Boolean) : Boolean#
Summary: Collects and adds line texts to the data item buffer.
procedure CheckAndAddLineTextBuffer(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; LineFormat: Text; var TextBuffer: Text; TextLine: Text; FormattedText: Text; LastLine: Boolean; NewBlock: Boolean; HasFormattedText: Boolean): Boolean
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Line number.DocumentLineType: Type of document line.LineFormat: Format specification.TextBuffer: Buffer for collecting text lines.TextLine: Current text line to add.FormattedText: Formatted text content.LastLine: Whether this is the last line.NewBlock: Whether to start a new block.HasFormattedText: Whether formatted text is present.
Returns: Always returns false.
Remarks: Ensures empty lines are printed when needed.
CheckAndAddDetailLineTextBuffer(Record KVSKBADocumentHeaderBuffer, Enum KVSKBADocumentTableType, Integer, Integer, Enum KVSKBADocumentLineType, Text, Text, Text, Text, Boolean, Boolean, Boolean) : Boolean#
Summary: Collects and adds detail line texts to the data item buffer.
procedure CheckAndAddDetailLineTextBuffer(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTableType: Enum "KVSKBADocumentTableType"; LineNo: Integer; DetailLineNo: Integer; DocumentLineType: Enum "KVSKBADocumentLineType"; LineFormat: Text; var TextBuffer: Text; TextLine: Text; FormattedText: Text; LastLine: Boolean; NewBlock: Boolean; HasFormattedText: Boolean): Boolean
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTableType: Type of document table.LineNo: Main line number.DetailLineNo: Detail line number.DocumentLineType: Type of document line.LineFormat: Format specification.TextBuffer: Buffer for collecting text lines.TextLine: Current text line to add.FormattedText: Formatted text content.LastLine: Whether this is the last line.NewBlock: Whether to start a new block.HasFormattedText: Whether formatted text is present.
Returns: Always returns false.
Remarks: Used for service documents with detail lines. Ensures empty lines are printed when needed.
AddDocTotalLine(Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentTotalBuffer) :#
Summary: Adds a total line to the data item buffer.
procedure AddDocTotalLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; DocumentTotalBuffer: Record "KVSKBADocumentTotalBuffer" temporary):
Parameters:
DocumentHeaderBuffer: Document header context.DocumentTotalBuffer: Total buffer containing the line data.
Remarks: Adds a total line to the data item buffer.
AddDocTotalText(Record KVSKBADocumentHeaderBuffer, Option, Text[250]) :#
Summary: Adds a total text line to the data item buffer.
procedure AddDocTotalText(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; TypeValue: Option; TextLine: Text[250]):
Parameters:
DocumentHeaderBuffer: Document header context.TypeValue: Type of the total line (option).TextLine: Text content of the line.
Remarks: Adds a total text line to the data item buffer.
AddDocTotalAmount(Record KVSKBADocumentHeaderBuffer, Option, Text[250], Decimal, Code[10], Date) :#
Summary: Adds a total amount line to the data item buffer.
procedure AddDocTotalAmount(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; TypeValue: Option; TextLine: Text[250]; AmountValue: Decimal; CurrencyValue: Code[10]; DateValue: Date):
Parameters:
DocumentHeaderBuffer: Document header context.TypeValue: Type of the total line (option).TextLine: Text description of the amount.AmountValue: Amount value.CurrencyValue: Currency code.DateValue: Date associated with the amount.
Remarks: Adds a total amount line to the data item buffer.
AddDocTotalFormattedText(Record KVSKBADocumentHeaderBuffer, Option, Text) :#
Summary: Adds a total formatted text line to the data item buffer.
procedure AddDocTotalFormattedText(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; TypeValue: Option; TextLine: Text):
Parameters:
DocumentHeaderBuffer: Document header context.TypeValue: Type of the total line (option).TextLine: Formatted text content.
Remarks: Adds a total formatted text line to the data item buffer.
InitVATTotals() :#
Summary: Resets VAT total values needed for total sum calculations.
procedure InitVATTotals():
AddDocVATLine(Record KVSKBADocumentHeaderBuffer, Code[20], Decimal, Decimal, Decimal, Decimal, Decimal, Decimal) :#
Summary: Adds a VAT specification line to the data item buffer.
procedure AddDocVATLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; VATIdentifier: Code[20]; VATPercent: Decimal; VATAmount: Decimal; VATBase: Decimal; LineAmount: Decimal; InvDiscBaseAmount: Decimal; InvDiscAmount: Decimal):
Parameters:
DocumentHeaderBuffer: Document header context.VATIdentifier: VAT identifier code.VATPercent: VAT percentage.VATAmount: VAT amount.VATBase: VAT base amount.LineAmount: Line amount.InvDiscBaseAmount: Invoice discount base amount.InvDiscAmount: Invoice discount amount.
Remarks: Updates VAT totals for summary calculations.
AddDocVATLineLCY(Record KVSKBADocumentHeaderBuffer, Code[20], Decimal, Text[250], Decimal, Decimal) :#
Summary: Adds a VAT specification line in local currency to the data item buffer.
procedure AddDocVATLineLCY(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; VATIdentifier: Code[20]; VATPercent: Decimal; ExchangeRate: Text[250]; VATBase: Decimal; VATAmount: Decimal):
Parameters:
DocumentHeaderBuffer: Document header context.VATIdentifier: VAT identifier code.VATPercent: VAT percentage.ExchangeRate: Exchange rate text.VATBase: VAT base amount in LCY.VATAmount: VAT amount in LCY.
Remarks: Adds a VAT specification line in local currency to the data item buffer.
AddDocVATClause(Record KVSKBADocumentHeaderBuffer, Code[20], Code[20], Decimal, Text[250], Text[250]) :#
Summary: Adds a VAT clause line to the data item buffer.
procedure AddDocVATClause(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; VATIdentifier: Code[20]; VATClauseCode: Code[20]; VATAmount: Decimal; Description: Text[250]; Description2: Text[250]):
Parameters:
DocumentHeaderBuffer: Document header context.VATIdentifier: VAT identifier code.VATClauseCode: VAT clause code.VATAmount: VAT amount.Description: Primary description.Description2: Secondary description.
Remarks: Adds a VAT clause line to the data item buffer.
AddDocPrepaymentVATLine(Record KVSKBADocumentHeaderBuffer, Code[20], Decimal, Decimal, Decimal, Decimal, Decimal, Decimal) :#
Summary: Adds a VAT specification prepayment line to the data item buffer.
procedure AddDocPrepaymentVATLine(DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; VATIdentifier: Code[20]; VATPercent: Decimal; VATAmount: Decimal; VATBase: Decimal; LineAmount: Decimal; InvDiscBaseAmount: Decimal; InvDiscAmount: Decimal):
Parameters:
DocumentHeaderBuffer: Document header context.VATIdentifier: VAT identifier code.VATPercent: VAT percentage.VATAmount: VAT amount.VATBase: VAT base amount.LineAmount: Line amount.InvDiscBaseAmount: Invoice discount base amount.InvDiscAmount: Invoice discount amount.
Remarks: Adds a VAT specification prepayment line to the data item buffer.
GetReportFileName(Integer, Text[80], Code[20]) : Text#
Summary: Generates language specific output filename
procedure GetReportFileName(ReportID: Integer; DocCaption: Text[80]; DocNo: Code[20]): Text
Parameters:
ReportID: Report ID as IntegerDocCaption: Document Caption as Text[80]DocNo: Document Number as Code[20]
Returns: Generated filename as Text
Remarks: If DocCaption is provided, it is used as the base for the filename. If DocNo is provided, it is appended to the base name using a predefined pattern. If neither is provided, a default pattern based on ReportID is used.
GetReportID(Text) : Integer#
Summary: Retrieves the report ID from a text representation.
procedure GetReportID(ReportID: Text): Integer
Parameters:
ReportID: Report ID as Text
Returns: Report ID as Integer
Remarks: Extracts the numeric report ID from a text string.
GetTableID(Variant) : Integer#
Summary: Retrieves the table ID from a record variant.
procedure GetTableID(TableVariant: Variant): Integer
Parameters:
TableVariant: Table variant to get ID from.
Returns: Table ID as integer, or 0 if variant is not a record.
Remarks: Returns the table ID of the given record variant.
CheckForPageBreak(Boolean, Integer) :#
Summary: Checks and forces a page break if required.
procedure CheckForPageBreak(PrintPageBreak: Boolean; LineNo: Integer):
Parameters:
PrintPageBreak: Whether to force a page break.LineNo: Line number for the page break.
ForcePageBreak(Boolean) :#
Summary: Force Page Break in Report
procedure ForcePageBreak(PrintPageBreak: Boolean):
Parameters:
PrintPageBreak: true the page break is forced
CheckForNewBlock(Integer) :#
Summary: Checks and forces a new block if required.
procedure CheckForNewBlock(LineNo: Integer):
Parameters:
LineNo: Line number for the new block.
Remarks: Forces a new line block at the specified line number.
IsMasterDocReport(Integer) : Boolean#
Summary: Checks if the given report ID belongs to a MasterDoc report.
procedure IsMasterDocReport(ReportID: Integer): Boolean
Parameters:
ReportID: Report ID to check.
Returns: True if the report is a MasterDoc report, false otherwise.
Remarks: By default, checks if ReportID is between 5048911 and 5048960.
RunArchiveManagement(Variant, Boolean, Boolean, Enum Report Selection Usage) :#
procedure RunArchiveManagement(DocumentHeaderBuffer: Variant; ArchiveDocument: Boolean; LogInteraction: Boolean; Usage: Enum "Report Selection Usage"):
RunSegManagement(Variant, Boolean, Enum Report Selection Usage) :#
procedure RunSegManagement(DocumentHeaderBuffer: Variant; LogInteraction: Boolean; ReportSelectionUsage: Enum "Report Selection Usage"):
GetSalesPurchasePersonInformation(Enum KVSKBAPrintSalesPerson, Code[20], Code[20], Code[50], Text[50], Text[50], Text[30], Text[30], Text[80], Text) :#
Summary: Retrieves sales/purchase person information based on provided parameters.
procedure GetSalesPurchasePersonInformation(PrintSalesPurchPerson: Enum "KVSKBAPrintSalesPerson"; SalesPurchPersonCode: Code[20]; SalesPurchPersonCode2: Code[20]; AssignedUserID: Code[50]; var SalesPurchPersonName: Text[50]; var SalesPurchPerson2Name: Text[50]; var PhoneNo: Text[30]; var FaxNo: Text[30]; var Email: Text[80]; ReportText: Text):
Parameters:
PrintSalesPurchPerson: Enum indicating which sales/purchase person to print.SalesPurchPersonCode: Code of the first sales/purchase person.SalesPurchPersonCode2: Code of the second sales/purchase person.AssignedUserID: User ID of the assigned user.SalesPurchPersonName: Output parameter for the name of the first sales/purchase person.SalesPurchPerson2Name: Output parameter for the name of the second sales/purchase person.PhoneNo: Output parameter for the phone number.FaxNo: Output parameter for the fax number.Email: Output parameter for the email address.ReportText: Text identifying the report.
Remarks: This procedure retrieves contact information for sales or purchase persons based on the provided codes. It fills the output parameters with the corresponding names, phone numbers, fax numbers, and email addresses.
GetDefaultReportOption(Integer, Text[50], Text[50]) : Text#
Summary: Retrieves a default report option value from user settings.
procedure GetDefaultReportOption(ReportID: Integer; OptionText: Text[50]; ParameterName: Text[50]): Text
Parameters:
ReportID: Report ID.OptionText: Name of the option to retrieve.ParameterName: Parameter name in settings.
Returns: Option value as text.
Remarks: Returns empty string if option is not found in user settings.
GetOptionValue(Text, Text[50]) : Text#
Summary: Extracts an option value from an XML parameter string.
procedure GetOptionValue(ParameterText: Text; OptionText: Text[50]): Text
Parameters:
ParameterText: XML parameter text.OptionText: Name of the option to extract.
Returns: Option value as text.
Remarks: Returns empty string if option is not found in the XML.
CalcSalesVATClauseVATAmountLines(Option, Record Sales Header, Record Sales Line, Record VAT Amount Line) :#
Summary: Calculates VAT amount lines from sales lines including VAT clause code.
procedure CalcSalesVATClauseVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"):
Parameters:
QtyType: Quantity type to calculate (General, Invoicing, or Shipping).SalesHeader: Sales header record.SalesLine: Sales line record.VATAmountLine: Output: VAT amount line buffer.
Remarks: Handles different quantity types for proper VAT calculation.
GetAbsMin(Decimal, Decimal) : Decimal#
Summary: Returns the absolute minimum of two decimal values.
procedure GetAbsMin(QtyToHandle: Decimal; QtyHandled: Decimal): Decimal
Parameters:
QtyToHandle: First decimal value.QtyHandled: Second decimal value.
Returns: The value with the smaller absolute value.
PurchOrdConfRemindVend(Text[100], Record KVSKBAPOrdConfRemHeader) :#
Summary: Formats the vendor address for a Purchase Order Confirmation Reminder header record.
procedure PurchOrdConfRemindVend(var AddrArray: Text[100]; var POrdConfRemHeader: Record "KVSKBAPOrdConfRemHeader"):
Parameters:
AddrArray: An array to hold the formatted address lines.POrdConfRemHeader: The Purchase Order Confirmation Reminder header record containing the address information.
Remarks: Uses the Format Address codeunit to format the address based on language code.
IssPurchOrdConfRemindVend(Text[100], Record KVSKBAIssuedPOrdConfRemHdr) :#
Summary: Formats the vendor address for an Issued Purchase Order Confirmation Reminder header record.
procedure IssPurchOrdConfRemindVend(var AddrArray: Text[100]; var IssuedPOrdConfRemHdr: Record "KVSKBAIssuedPOrdConfRemHdr"):
Parameters:
AddrArray: An array to hold the formatted address lines.IssuedPOrdConfRemHdr: The Issued Purchase Order Confirmation Reminder header record containing the address information.
Remarks: Uses the Format Address codeunit to format the address based on language code.
OnBeforeCalcSalesVATClauseVATAmountLines(Option, Record Sales Header, Record Sales Line, Record VAT Amount Line, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered before calculating sales VAT clause VAT amount lines.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnBeforeCalcSalesVATClauseVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeCalcSalesVATClauseVATAmountLines', '', false, false)]
local procedure DoSomethingOnBeforeCalcSalesVATClauseVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean)
begin
end;
Parameters:
QtyType: Quantity type option.SalesHeader: Sales header record.SalesLine: Sales line record.VATAmountLine: VAT amount line record.IsHandled: Set to true to skip standard code execution.
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to implement custom VAT calculation logic for sales documents. Set IsHandled to true to completely replace the standard VAT calculation.
OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(Record Sales Header, Record Sales Line, Record VAT Amount Line) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered before inserting a VAT amount line during sales VAT clause calculation.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert', '', false, false)]
local procedure DoSomethingOnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")
begin
end;
Parameters:
SalesHeader: Sales header record.SalesLine: Sales line record.VATAmountLine: VAT amount line being inserted (can be modified).
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to modify VAT amount line fields before insertion during VAT calculation. Subscribe to this event to adjust VAT amounts or add custom VAT-related data.
OnAfterCheckForMasterDocReport(Integer, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered after checking if a report is a MasterDoc report.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnAfterCheckForMasterDocReport(ReportID: Integer; var IsMasterDocReport: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnAfterCheckForMasterDocReport', '', false, false)]
local procedure DoSomethingOnAfterCheckForMasterDocReport(ReportID: Integer; var IsMasterDocReport: Boolean)
begin
end;
Parameters:
ReportID: Report ID that was checked.IsMasterDocReport: Result flag (can be modified).
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to override or extend the logic that determines if a report is a MasterDoc report. Modify IsMasterDocReport to change the result of the check for specific report IDs.
Events#
OnBeforeInsertTmpHeaderBufferInAddDocHeader(Record KVSKBADocumentHeaderBuffer) :#
Summary: Integration event triggered before inserting a temporary header buffer in AddDocHeader.
[IntegrationEvent(true, false)]
local procedure OnBeforeInsertTmpHeaderBufferInAddDocHeader(var DocHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeInsertTmpHeaderBufferInAddDocHeader', '', false, false)]
local procedure DoSomethingOnBeforeInsertTmpHeaderBufferInAddDocHeader(var DocHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary)
begin
end;
Parameters:
DocHeaderBuffer: Temporary document header buffer being inserted.
Remarks: Use this event to modify header buffer fields before insertion. Subscribe to this event to add custom validations or field modifications.
OnBeforeModifyTmpHeaderBufferInUpdateDocHeader(Record KVSKBADocumentHeaderBuffer) :#
Summary: Integration event triggered before modifying a temporary header buffer in UpdateDocHeader.
[IntegrationEvent(true, false)]
local procedure OnBeforeModifyTmpHeaderBufferInUpdateDocHeader(var DocHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeModifyTmpHeaderBufferInUpdateDocHeader', '', false, false)]
local procedure DoSomethingOnBeforeModifyTmpHeaderBufferInUpdateDocHeader(var DocHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary)
begin
end;
Parameters:
DocHeaderBuffer: Temporary document header buffer being modified.
Remarks: Use this event to modify header buffer fields before update. Subscribe to this event to add custom validations or field modifications during updates.
OnBeforeAddDocVATClause(Record KVSKBADocumentHeaderBuffer, Code[20], Code[20], Decimal, Text[250], Text[250], Boolean) :#
Summary: Integration event triggered before adding a document VAT clause.
[IntegrationEvent(true, false)]
local procedure OnBeforeAddDocVATClause(var DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; var VATIdentifier: Code[20]; var VATClauseCode: Code[20]; var VATAmount: Decimal; var Description: Text[250]; var Description2: Text[250]; var ExitStandardCode: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeAddDocVATClause', '', false, false)]
local procedure DoSomethingOnBeforeAddDocVATClause(var DocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer"; var VATIdentifier: Code[20]; var VATClauseCode: Code[20]; var VATAmount: Decimal; var Description: Text[250]; var Description2: Text[250]; var ExitStandardCode: Boolean)
begin
end;
Parameters:
DocumentHeaderBuffer: Document header context.VATIdentifier: VAT identifier code (can be modified).VATClauseCode: VAT clause code (can be modified).VATAmount: VAT amount (can be modified).Description: Primary description (can be modified).Description2: Secondary description (can be modified).ExitStandardCode: Set to true to skip standard code execution.
Remarks: Use this event to modify VAT clause data or implement custom VAT clause handling. Set ExitStandardCode to true to completely replace the standard VAT clause insertion logic.
OnBeforeAddDocTotalLineToDataItemBuffer(Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentTotalBuffer) :#
Summary: Integration event triggered before adding a document total line to the data item buffer.
[IntegrationEvent(true, false)]
local procedure OnBeforeAddDocTotalLineToDataItemBuffer(DocHeader: Record "KVSKBADocumentHeaderBuffer"; var DocTotalLine: Record "KVSKBADocumentTotalBuffer" temporary):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeAddDocTotalLineToDataItemBuffer', '', false, false)]
local procedure DoSomethingOnBeforeAddDocTotalLineToDataItemBuffer(DocHeader: Record "KVSKBADocumentHeaderBuffer"; var DocTotalLine: Record "KVSKBADocumentTotalBuffer" temporary)
begin
end;
Parameters:
DocHeader: Document header context.DocTotalLine: Temporary document total buffer being added.
Remarks: Use this event to modify total line data before it is added to the data item buffer. Subscribe to this event to implement custom total calculations or formatting.
OnBeforeInsertStaticDataItem(Record KVSKBADocumentDataItemBuffer) :#
Summary: Integration event triggered before inserting a static data item.
[IntegrationEvent(true, false)]
local procedure OnBeforeInsertStaticDataItem(var DocDataItemBuffer: Record "KVSKBADocumentDataItemBuffer" temporary):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeInsertStaticDataItem', '', false, false)]
local procedure DoSomethingOnBeforeInsertStaticDataItem(var DocDataItemBuffer: Record "KVSKBADocumentDataItemBuffer" temporary)
begin
end;
Parameters:
DocDataItemBuffer: Temporary document data item buffer being inserted.
Remarks: Use this event to modify static data (layout settings, fonts, etc.) before insertion. Subscribe to this event to add custom static fields or modify layout parameters.
OnBeforeAddCaptionForAdditionalFields(Text[50], Text[50], Text[50], Record KVSKBADocumentHeaderBuffer, Codeunit KVSKBAMasterDocFieldData, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeAddCaptionForAdditionalFields(ExtLotCaption: Text[50]; ProductionDate: Text[50]; ExpirationDate: Text[50]; var DocHeader: Record "KVSKBADocumentHeaderBuffer"; var FieldDataList: Codeunit "KVSKBAMasterDocFieldData"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeAddCaptionForAdditionalFields', '', false, false)]
local procedure DoSomethingOnBeforeAddCaptionForAdditionalFields(ExtLotCaption: Text[50]; ProductionDate: Text[50]; ExpirationDate: Text[50]; var DocHeader: Record "KVSKBADocumentHeaderBuffer"; var FieldDataList: Codeunit "KVSKBAMasterDocFieldData"; var IsHandled: Boolean)
begin
end;
OnBeforeGetSalesPurchasePersonInformation(Enum KVSKBAPrintSalesPerson, Code[20], Code[20], Code[50], Text[50], Text[50], Text[30], Text[30], Text[80], Integer, Boolean) :#
Summary: Integration event triggered before getting sales/purchase person information.
[IntegrationEvent(false, false)]
local procedure OnBeforeGetSalesPurchasePersonInformation(PrintSalesPurchPerson: Enum "KVSKBAPrintSalesPerson"; SalesPurchPersonCode: Code[20]; SalesPurchPersonCode2: Code[20]; AssignedUserID: Code[50]; var SalesPurchPersonName: Text[50]; var SalesPurchPerson2Name: Text[50]; var PhoneNo: Text[30]; var FaxNo: Text[30]; var Email: Text[80]; ReportID: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeGetSalesPurchasePersonInformation', '', false, false)]
local procedure DoSomethingOnBeforeGetSalesPurchasePersonInformation(PrintSalesPurchPerson: Enum "KVSKBAPrintSalesPerson"; SalesPurchPersonCode: Code[20]; SalesPurchPersonCode2: Code[20]; AssignedUserID: Code[50]; var SalesPurchPersonName: Text[50]; var SalesPurchPerson2Name: Text[50]; var PhoneNo: Text[30]; var FaxNo: Text[30]; var Email: Text[80]; ReportID: Integer; var IsHandled: Boolean)
begin
end;
Parameters:
PrintSalesPurchPerson: Which person's information to retrieve.SalesPurchPersonCode: Primary code (can be modified).SalesPurchPersonCode2: Secondary code (can be modified).AssignedUserID: Assigned user ID (can be modified).SalesPurchPersonName: Output name (can be modified).SalesPurchPerson2Name: Output secondary name (can be modified).PhoneNo: Output phone number (can be modified).FaxNo: Output fax number (can be modified).Email: Output email (can be modified).ReportID: Report ID context.IsHandled: Set to true to skip standard code execution.
Remarks: Use this event to implement custom logic for retrieving salesperson/purchaser contact information. Set IsHandled to true to completely replace the standard information retrieval logic.
OnAfterGetSalesPurchasePersonInformation(Enum KVSKBAPrintSalesPerson, Code[20], Code[20], Code[50], Text[50], Text[50], Text[30], Text[30], Text[80], Integer) :#
Summary: Integration event triggered after getting sales/purchase person information.
[IntegrationEvent(false, false)]
local procedure OnAfterGetSalesPurchasePersonInformation(PrintSalesPurchPerson: Enum "KVSKBAPrintSalesPerson"; SalesPurchPersonCode: Code[20]; SalesPurchPersonCode2: Code[20]; AssignedUserID: Code[50]; var SalesPurchPersonName: Text[50]; var SalesPurchPerson2Name: Text[50]; var PhoneNo: Text[30]; var FaxNo: Text[30]; var Email: Text[80]; ReportID: Integer):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnAfterGetSalesPurchasePersonInformation', '', false, false)]
local procedure DoSomethingOnAfterGetSalesPurchasePersonInformation(PrintSalesPurchPerson: Enum "KVSKBAPrintSalesPerson"; SalesPurchPersonCode: Code[20]; SalesPurchPersonCode2: Code[20]; AssignedUserID: Code[50]; var SalesPurchPersonName: Text[50]; var SalesPurchPerson2Name: Text[50]; var PhoneNo: Text[30]; var FaxNo: Text[30]; var Email: Text[80]; ReportID: Integer)
begin
end;
Parameters:
PrintSalesPurchPerson: Which person's information was retrieved.SalesPurchPersonCode: Primary code.SalesPurchPersonCode2: Secondary code.AssignedUserID: Assigned user ID.SalesPurchPersonName: Retrieved name (can be modified).SalesPurchPerson2Name: Retrieved secondary name (can be modified).PhoneNo: Retrieved phone number (can be modified).FaxNo: Retrieved fax number (can be modified).Email: Retrieved email (can be modified).ReportID: Report ID context.
Remarks: Use this event to modify the retrieved contact information or add additional processing. Subscribe to this event when you need to post-process or validate the retrieved information.
OnBeforeRunArchiveManagement(Variant, Boolean, Boolean, Enum Report Selection Usage, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeRunArchiveManagement(var DocHeader: Variant; var ArchiveDocument: Boolean; var LogInteraction: Boolean; var Usage: Enum "Report Selection Usage"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeRunArchiveManagement', '', false, false)]
local procedure DoSomethingOnBeforeRunArchiveManagement(var DocHeader: Variant; var ArchiveDocument: Boolean; var LogInteraction: Boolean; var Usage: Enum "Report Selection Usage"; var IsHandled: Boolean)
begin
end;
OnAfterRunArchiveManagement(Variant, Boolean, Boolean, Enum Report Selection Usage) :#
[IntegrationEvent(false, false)]
local procedure OnAfterRunArchiveManagement(var DocHeader: Variant; var ArchiveDocument: Boolean; var LogInteraction: Boolean; var Usage: Enum "Report Selection Usage"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnAfterRunArchiveManagement', '', false, false)]
local procedure DoSomethingOnAfterRunArchiveManagement(var DocHeader: Variant; var ArchiveDocument: Boolean; var LogInteraction: Boolean; var Usage: Enum "Report Selection Usage")
begin
end;
OnBeforeTrytoDetermineReportID(Text, Integer, Boolean) :#
Summary: Integration event triggered before trying to determine report ID from text.
[IntegrationEvent(false, false)]
local procedure OnBeforeTrytoDetermineReportID(ReportText: Text; var ReportID: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeTrytoDetermineReportID', '', false, false)]
local procedure DoSomethingOnBeforeTrytoDetermineReportID(ReportText: Text; var ReportID: Integer; var IsHandled: Boolean)
begin
end;
Parameters:
ReportText: Report text to parse.ReportID: Output report ID (can be set).IsHandled: Set to true to skip standard code execution.
Remarks: Use this event to implement custom report ID determination logic. Set IsHandled to true and provide the ReportID to bypass the standard parsing logic.
OnAfterInitMaster(Integer, Integer, Boolean, Boolean) :#
Summary: Integration event triggered after initializing MasterDoc.
[IntegrationEvent(false, false)]
local procedure OnAfterInitMaster(ReportID: Integer; NoOfCopies: Integer; PrintOnNote: Boolean; ShowInternalInfo: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnAfterInitMaster', '', false, false)]
local procedure DoSomethingOnAfterInitMaster(ReportID: Integer; NoOfCopies: Integer; PrintOnNote: Boolean; ShowInternalInfo: Boolean)
begin
end;
Parameters:
ReportID: Report ID.NoOfCopies: Number of copies.PrintOnNote: Print on notepaper flag.ShowInternalInfo: Show internal information flag.
Remarks: Use this event to perform additional initialization or modify global settings. Subscribe to this event when custom initialization is needed for specific reports.
OnBeforeCalcSalesVATClauseVATAmountLines(Option, Record Sales Header, Record Sales Line, Record VAT Amount Line, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered before calculating sales VAT clause VAT amount lines.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnBeforeCalcSalesVATClauseVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnBeforeCalcSalesVATClauseVATAmountLines', '', false, false)]
local procedure DoSomethingOnBeforeCalcSalesVATClauseVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean)
begin
end;
Parameters:
QtyType: Quantity type option.SalesHeader: Sales header record.SalesLine: Sales line record.VATAmountLine: VAT amount line record.IsHandled: Set to true to skip standard code execution.
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to implement custom VAT calculation logic for sales documents. Set IsHandled to true to completely replace the standard VAT calculation.
OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(Record Sales Header, Record Sales Line, Record VAT Amount Line) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered before inserting a VAT amount line during sales VAT clause calculation.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert', '', false, false)]
local procedure DoSomethingOnCalcSalesVATClauseVATAmountLinesOnBeforeVATAmountLineInsert(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")
begin
end;
Parameters:
SalesHeader: Sales header record.SalesLine: Sales line record.VATAmountLine: VAT amount line being inserted (can be modified).
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to modify VAT amount line fields before insertion during VAT calculation. Subscribe to this event to adjust VAT amounts or add custom VAT-related data.
OnAfterCheckForMasterDocReport(Integer, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event triggered after checking if a report is a MasterDoc report.
[Obsolete('Not intended for public use. Will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place.', '26.4')]
[IntegrationEvent(false, false)]
procedure OnAfterCheckForMasterDocReport(ReportID: Integer; var IsMasterDocReport: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMasterDoc", 'OnAfterCheckForMasterDocReport', '', false, false)]
local procedure DoSomethingOnAfterCheckForMasterDocReport(ReportID: Integer; var IsMasterDocReport: Boolean)
begin
end;
Parameters:
ReportID: Report ID that was checked.IsMasterDocReport: Result flag (can be modified).
Remarks: This procedure is obsolete and will be internal in future releases. This does only affect procedure caller not subscribers. The event remains in place. Use this event to override or extend the logic that determines if a report is a MasterDoc report. Modify IsMasterDocReport to change the result of the check for specific report IDs.