Table of Contents

KVSKBADocumentDataItemBuffer

Fields

Name Type Note
Doc Scope Enum (KVSKBADocumentScope)
Doc Type Enum (KVSKBADocumentType)
No. Code[20]
Doc. No. Occurrence Integer
Version No. Integer
Document Order No. Integer
OutputNo Integer
Entry No. Integer
DataItem Type Enum (KVSKBADocumentDataItemType)
Table Type Enum (KVSKBADocumentTableType)
Line No. Integer
Detail Line No. Integer
Line Type Enum (KVSKBADocumentLineType)
Sort Trigger 1 Text[50]
Sort Trigger 2 Text[50]
Sort Trigger 3 Text[50]
Decimal 1 Decimal
Decimal 2 Decimal
Carry Amount Decimal
Page Break Trigger Integer
Line Block Trigger Integer
Line Format String Text[250]
Line Fields Blob
Formatted Text Blob
Picture 1 Blob
Picture 2 Blob
Picture 3 Blob

Procedures

InitByHeader(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer) :

procedure InitByHeader(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary): 

AddCustomFields(Codeunit KVSKBAMasterDocFieldData) :

procedure AddCustomFields(var CustomFieldsDataList: Codeunit "KVSKBAMasterDocFieldData"): 

InsertDocHeader(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer) :

procedure InsertDocHeader(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary): 

UpdateDocHeader(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer, Codeunit KVSKBAMasterDocFieldData) :

procedure UpdateDocHeader(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary; var CustomFieldsDataList: Codeunit "KVSKBAMasterDocFieldData"): 

InsertDocHeading(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentHeadingBuffer) :

procedure InsertDocHeading(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary; var tmpDocHeading: Record "KVSKBADocumentHeadingBuffer" temporary): 

InsertDocLine(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentLineBuffer) :

procedure InsertDocLine(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary; var tmpDocLine: Record "KVSKBADocumentLineBuffer" temporary): 

InsertDocTotalLine(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentTotalBuffer) :

procedure InsertDocTotalLine(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary; var tmpDocTotal: Record "KVSKBADocumentTotalBuffer" temporary): 

InsertDocVATInfoLine(Codeunit KVSKBAMasterDocGlobalData, Record KVSKBADocumentHeaderBuffer, Record KVSKBADocumentVATInfoBuffer) :

procedure InsertDocVATInfoLine(var GlobalData: Codeunit "KVSKBAMasterDocGlobalData"; var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer" temporary; var tmpDocTotal: Record "KVSKBADocumentVATInfoBuffer" temporary): 

GetLineFields() : Text

Summary: Retrieves the line fields for the document data item buffer by reading the contents of the "Line Fields" blob field. This procedure creates an input stream from the "Line Fields" blob, reads the text content using UTF-8 encoding, and returns it as a text string. If the "Line Fields" blob does not have a value, an empty string will be returned. Additionally, if the data item type is a document header, the procedure will call UpdateHeaderLineFieldsForCopy to conditionally update the line fields based on the copy loop number.

procedure GetLineFields(): Text

Returns: The line fields retrieved from the "Line Fields" blob field. If the blob field does not have a value, an empty string will be returned.

Remarks: Call this procedure to access the line fields associated with the document data item buffer. Ensure that the "Line Fields" blob field contains valid UTF-8 encoded text before calling this procedure to avoid any issues with text retrieval. If the data item type is a document header, the line fields may be updated based on the copy loop number to ensure that certain fields are cleared or modified for copies of the document header.

SetLineFields(Text) :

Summary: Sets the line fields for the document data item buffer by writing the provided text to the "Line Fields" blob field. This procedure takes a text input, clears any existing value in the "Line Fields" blob, and then writes the new text to it using a UTF-8 encoding. The line fields can contain various pieces of information related to the document line, such as field values or other relevant data that needs to be stored in association with the document data item.

procedure SetLineFields(WriteText: Text): 

Parameters:

  • WriteText: The text to be written to the "Line Fields" blob field. This text should contain the necessary information related to the document line that needs to be stored in the buffer.

Remarks: Call this procedure to update the line fields associated with the document data item buffer. The provided text will be stored in the "Line Fields" blob field and can be retrieved later using the GetLineFields procedure.

GetBlobText() : Text

Summary: Retrieves the formatted text from the "Formatted Text" blob field of the document data item buffer. This procedure reads the contents of the "Formatted Text" blob, which is expected to be stored in UTF-8 encoding, and returns it as a text string. The formatted text can be used for display purposes or for any other functionality that requires formatted textual information associated with the document data item.

procedure GetBlobText(): Text

Returns: The formatted text retrieved from the "Formatted Text" blob field. If the blob field does not have a value, an empty string will be returned.

Remarks: Call this procedure to access the formatted text associated with the document data item buffer. Ensure that the "Formatted Text" blob field contains valid UTF-8 encoded text before calling this procedure to avoid any issues with text retrieval.

SetBlobText(Text) :

Summary: Sets the formatted text for the document data item buffer by writing the provided text to the "Formatted Text" blob field. This procedure takes a text input, clears any existing value in the "Formatted Text" blob, and then writes the new text to it using a UTF-8 encoding. The formatted text can be used for display purposes or for any other functionality that requires formatted textual information associated with the document data item.

procedure SetBlobText(WriteText: Text): 

Parameters:

  • WriteText: The text to be written to the "Formatted Text" blob field. This text should be formatted as needed for its intended use, such as for display in a document or report.

Remarks: Call this procedure to update the formatted text associated with the document data item buffer. The provided text will be stored in the "Formatted Text" blob field and can be retrieved later using the GetBlobText procedure.

SetDocTextTranslation(Record KVSKBADocumentTextTranslation) :

Summary: Sets the document text translation record for the current document data item buffer. This procedure allows you to associate a document text translation record with the current document data item buffer, which may include translated text and associated pictures for the document. The document text translation information can be used for display or processing purposes related to the document.

procedure SetDocTextTranslation(var InDocTextTranslation: Record "KVSKBADocumentTextTranslation"): 

Parameters:

  • InDocTextTranslation: A record variable containing the document text translation information to be associated with the current document data item buffer. This record may include translated text and pictures for the document.

Remarks: Call this procedure to set the document text translation information for the current document data item buffer. The provided record will be stored and can be retrieved later using the GetDocTextTranslation procedure.

GetDocTextTranslation(Record KVSKBADocumentTextTranslation) :

Summary: Retrieves the document text translation record associated with the current document data item buffer. The retrieved document text translation record is returned via the OutDocTextTranslation parameter. This procedure allows you to access the document text translation information, which may include translated text and associated pictures for the document.

procedure GetDocTextTranslation(var OutDocTextTranslation: Record "KVSKBADocumentTextTranslation"): 

Parameters:

  • OutDocTextTranslation: A record variable that will be populated with the document text translation information associated with the current document data item buffer.

Remarks: Call this procedure to retrieve the document text translation information for the current document data item buffer. The returned record will contain any translated text and pictures that are associated with the document, which can be used for display or processing purposes.

SetPicture1FromBlob(Codeunit Temp Blob) :

procedure SetPicture1FromBlob(TempBlob: Codeunit "Temp Blob"): 

SetPicture2FromBlob(Codeunit Temp Blob) :

procedure SetPicture2FromBlob(TempBlob: Codeunit "Temp Blob"): 

SetPicture3FromBlob(Codeunit Temp Blob) :

procedure SetPicture3FromBlob(TempBlob: Codeunit "Temp Blob"): 

SetCopyLoopNo(Integer) :

Summary: Sets the copy loop number for the document data item buffer. This is used to track the current iteration when copying document headers for multiple copies. The copy loop number can be used in conjunction with the UpdateHeaderLineFieldsForCopy procedure to conditionally update line fields based on the copy iteration.

procedure SetCopyLoopNo(LoopNo: Integer): 

Parameters:

  • LoopNo: The current copy loop number, where 1 represents the first copy, 2 represents the second copy, and so on.

Remarks: Call this procedure during the copying of the document header to set the current copy loop number. This allows for conditional logic to be applied when updating line fields for each copy of the document header.

UpdateHeaderLineFieldsForCopy(Text) :

Summary: Updates the line fields for the document header based on the current copy loop number. This is used to ensure that certain fields are cleared or updated appropriately when copying the document header for multiple copies.

procedure UpdateHeaderLineFieldsForCopy(var LineFields: Text): 

Parameters:

  • LineFields: The line fields text that may be updated based on the copy loop number.

Remarks: Call this procedure during the copying of the document header to update line fields as needed for each copy. For example, you may want to clear certain fields for all copies except the first one.

Events

OnBeforeTransferPictures(Record KVSKBADocumentTextTranslation, Record KVSKBADocumentHeaderBuffer, Boolean) :

Summary: Integration event that is raised before transferring pictures from the document header to the document data item

[IntegrationEvent(false, false)]
local procedure OnBeforeTransferPictures(var KVSKBADocumentTextTranslation: Record "KVSKBADocumentTextTranslation"; var TempKVSKBADocumentHeaderBuffer: Record "KVSKBADocumentHeaderBuffer" temporary; var IsHandled: Boolean): 

Parameters:

  • KVSKBADocumentTextTranslation: The record of the document text translation which may contain pictures to be transferred.
  • TempKVSKBADocumentHeaderBuffer: The temporary buffer of the document header which may contain pictures to be transferred.
  • IsHandled: A boolean variable that can be set to true to indicate that the event has been handled and the default picture transfer logic should be skipped.

Remarks: Use this event to perform custom logic before pictures are transferred from the document header to the document data item. Set IsHandled to true to skip the default picture transfer behavior.