Table of Contents

KVSKBAPurchaseDocumentText

Fields

Name Type Note
Document Type Enum Purchase Document Type
Document No. Code[20]
Document Line No. Integer
Position Enum (KVSKBATextPosition)
Line No. Integer
Text Text[130]
Quote Print Boolean
Order Print Boolean
Posted Invoice Print Boolean
Posted Credit Memo Print Boolean
Blanket Order Print Boolean
Return Order Print Boolean
Posted Receipt Print Boolean
Posted Return Shipment Boolean
Separator Enum (KVSKBASeparator)
Formatted Text Blob
Starting Date Date
Ending Date Date
Prepayment Invoice Print Boolean
Prepayment Credit Memo Print Boolean
Order Type Code[10]

Procedures

TransferFieldsFromExtTextLine(Record Extended Text Line) :

Summary: Transfers fields from the extended text line to the purchase document text record.

procedure TransferFieldsFromExtTextLine(ExtendedTextLine: Record "Extended Text Line"): 

Parameters:

  • ExtendedTextLine: The extended text line record.

Remarks: This procedure copies relevant fields from the provided extended text line record to the current purchase document text record. It also raises events before and after the transfer for additional custom logic.

GetBlobText() : Text

Summary: Gets the blob text from the "Formatted Text" field and returns it as a string.

procedure GetBlobText(): Text

Returns: The blob text as a string.

Remarks: This method reads the "Formatted Text" blob field and returns its content as a string. It uses an InStream to read the blob data.

SetBlobText(Text) :

Summary: Sets the blob text in the "Formatted Text" field.

procedure SetBlobText(WriteText: Text): 

Parameters:

  • WriteText: The text to write to the blob field.

Remarks: This procedure clears the existing content of the "Formatted Text" field and writes the provided text to it using an OutStream with UTF-8 encoding.

GetPlainBlobText() : Text

Summary: Gets the plain text from the "Formatted Text" field and returns it as a string.

procedure GetPlainBlobText(): Text

Returns: The plain text as a string.

Remarks: This procedure retrieves the plain text from the "Formatted Text" blob field using the EditorMgt codeunit.

Events

OnBeforeTransferFieldsFromExtTextLine(Record KVSKBAPurchaseDocumentText, Record Extended Text Line) :

Summary: Event raised before transferring fields from the extended text line to the purchase document text.

[IntegrationEvent(false, false)]
local procedure OnBeforeTransferFieldsFromExtTextLine(var KVSKBAPurchaseDocumentText: Record "KVSKBAPurchaseDocumentText"; var ExtendedTextLine: Record "Extended Text Line"): 

Parameters:

  • KVSKBAPurchaseDocumentText: The purchase document text record.
  • ExtendedTextLine: The extended text line record.

Remarks: This event allows for additional custom logic to be executed before the fields are transferred from the extended text line to the purchase document text record.

OnAfterTransferFieldsFromExtTextLine(Record KVSKBAPurchaseDocumentText, Record Extended Text Line) :

Summary: Event raised after the fields have been transferred from the extended text line to the purchase document text.

[IntegrationEvent(false, false)]
local procedure OnAfterTransferFieldsFromExtTextLine(var KVSKBAPurchaseDocumentText: Record "KVSKBAPurchaseDocumentText"; ExtendedTextLine: Record "Extended Text Line"): 

Parameters:

  • KVSKBAPurchaseDocumentText: The purchase document text record.
  • ExtendedTextLine: The extended text line record.

Remarks: This event allows for additional custom logic to be executed after the fields have been transferred from the extended text line to the purchase document text record.