Skip to content

KVSKBADocumentTotalBuffer#

Fields#

Name Type Note
Doc Scope Enum (KVSKBADocumentScope)
Doc Type Enum (KVSKBADocumentType)
No. Code[20]
Doc. No. Occurrence Integer
Version No. Integer
Entry No. Integer
Line Type Option OptionMembers: TotalText,TotalAmount,FeeText,SignatureBlock,TotalFormattedText,FeeAmount,FeeFormattedText,,HeadingComment,ServiceComment
Text Text[250]
Amount Decimal
Currency Code Code[10]
Date Date
Formatted Text Blob
Custom Fields Blob

Procedures#

BuildFieldDataList(Record KVSKBADocumentHeaderBuffer) :#

procedure BuildFieldDataList(var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer"): 

GetFieldDataText() : Text#

procedure GetFieldDataText(): Text

AddCustomFields(Codeunit KVSKBAMasterDocFieldData) :#

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

GetTableType() : Enum#

Summary: Determines the document table type based on the line type of the current record.

procedure GetTableType(): Enum KVSKBADocumentTableType

Returns: The corresponding KVSKBADocumentTableType enum value for the line type.

Remarks: This procedure maps the "Line Type" option of the current record to a specific document table type (KVSKBADocumentTableType). Before applying the default mapping, it raises the OnBeforeGetTableType integration event, allowing subscribers to override the mapping logic for extensibility.

        If not handled externally, the procedure uses a case statement to map each line type (e.g., TotalText,
        TotalAmount, FeeText, SignatureBlock, etc.) to its corresponding table type (e.g., TotalTable, FeeTable,
        SignatureTable, ServiceHeadingTable, ServiceCommentTable). If the line type does not match any known value,
        TotalTable is returned as the default.

        This mapping is used to control layout and formatting logic for document totals, fees, headings, and comments
        in reports and printouts. It enables flexible and maintainable document rendering by separating line type logic
        from table layout logic.

GetLineType() : Enum#

procedure GetLineType(): Enum KVSKBADocumentLineType

GetBlobText() : Text#

procedure GetBlobText(): Text

SetBlobText(Text) :#

procedure SetBlobText(WriteText: Text): 

UpdateCustomFields() : Boolean#

procedure UpdateCustomFields(): Boolean

ClearCustomFields() :#

procedure ClearCustomFields(): 

GetCustomFields() : Text#

procedure GetCustomFields(): Text

SetCustomFields(Text) :#

procedure SetCustomFields(WriteText: Text): 

AddCustomFieldText(Text, Text) :#

procedure AddCustomFieldText(Key: Text; Value: Text): 

Events#

OnBeforeGetLineType(Record KVSKBADocumentTotalBuffer, Enum KVSKBADocumentLineType, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnBeforeGetLineType(KVSKBADocumentTotalBuffer: Record "KVSKBADocumentTotalBuffer"; var KVSKBADocumentLineType: Enum "KVSKBADocumentLineType"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBADocumentTotalBuffer", 'OnBeforeGetLineType', '', false, false)]
local procedure DoSomethingOnBeforeGetLineType(KVSKBADocumentTotalBuffer: Record "KVSKBADocumentTotalBuffer"; var KVSKBADocumentLineType: Enum "KVSKBADocumentLineType"; var IsHandled: Boolean)
begin
end;

OnBeforeGetTableType(Record KVSKBADocumentTotalBuffer, Enum KVSKBADocumentTableType, Boolean) :#

Summary: Integration event: Allows subscribers to override the default table type mapping for a document total line.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetTableType(DocumentTotalBuffer: Record "KVSKBADocumentTotalBuffer"; var DocumentTableType: Enum "KVSKBADocumentTableType"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Table, Table::"KVSKBADocumentTotalBuffer", 'OnBeforeGetTableType', '', false, false)]
local procedure DoSomethingOnBeforeGetTableType(DocumentTotalBuffer: Record "KVSKBADocumentTotalBuffer"; var DocumentTableType: Enum "KVSKBADocumentTableType"; var IsHandled: Boolean)
begin
end;

Parameters:

  • DocumentTotalBuffer: The current KVSKBADocumentTotalBuffer record.
  • DocumentTableType: The document table type to be set by the subscriber.
  • IsHandled: Set to true by the subscriber to indicate that custom logic was applied and default processing should be skipped.

Remarks: This integration event is raised before the standard logic in GetTableType is executed. Subscribers can use this event to provide custom mapping from line type to document table type, for example to support additional line types or implement company-specific layout rules. If a subscriber sets IsHandled to true, the default mapping logic is bypassed and the value assigned to DocumentTableType by the subscriber is used instead. This enables extensibility for report and document layout scenarios without modifying the base table logic.