Interface

Interface

We have provided an interface codeunit so you can add Red Ink Texts from third party extensions. This is codeunit 11310933, "Red Ink Text Interface".

The codeunit has these four methods.

InsertTextInterface with HTML text

/// <summary>
/// Insert the text from any source table
/// </summary>
/// <param name="RecVar">The record for which you are adding text.</param>
/// <param name="Type">The text type from the Red Ink Text Type table</param>
/// <param name="Description">The text description</param>
/// <param name="FlowToTransaction">Specifies if the text should flow with the document flow, quote, order, invoice</param>
/// <param name="TextOrder">The order in which the text should be displayed on the document</param>
/// <param name="DocumentDate">The date for the document</param>
/// <param name="htmlText">The text you want to add. Can be plain text or html formatted</param>///
/// <returns>The generated preview text</returns>
procedure InsertTextInterface(RecVar: Variant; Type: Code[20]; Description: Text; FlowToTransaction: Boolean; TextOrder: Integer; DocumentDate: Date; htmlText: Text): Text

InsertTextInterface without html text

/// <summary>
/// Insert the text from any source table. If Apply Automatically is enabled on a relevant template that template is used.
/// </summary>
/// <param name="RecVar">The record for which you are adding text.</param>
/// <param name="Type">The text type from the Red Ink Text Type table</param>
/// <param name="Description">The text description</param>
/// <param name="FlowToTransaction">Specifies if the text should flow with the document flow, quote, order, invoice</param>
/// <param name="TextOrder">The order in which the text should be displayed on the document</param>
/// <param name="DocumentDate">The date for the document</param>
/// <returns>The generated Red Ink Text Entry No</returns>
procedure InsertTextInterface(RecVar: Variant; Type: Code[20]; Description: Text; FlowToTransaction: Boolean; TextOrder: Integer; DocumentDate: Date): Integer

InsertTextInterface for text only

/// <summary>
/// Insert the text for a Red Ink Text
/// </summary>
/// <param name="InkTextEntryNo">The record for which you are adding text.</param>
/// <param name="HtmlText">The text you want to add. Can be plain text or html formatted</param>///
/// <returns>The generated preview text</returns>
procedure InsertTextInterface(InkTextEntryNo: Integer; HtmlText: Text): Text

InsertTextFromTemplateInterface

/// <summary>
/// Insert the template text from any source table
/// </summary>
/// <param name="RecVar">The record for which you are adding text.</param>
/// <param name="TemplateCode">The text you want to add. Can be plain text or html formatted</param>///
/// <returns>The generated Red Ink Text Entry No</returns>
procedure InsertTextFromTemplateInterface(RecVar: Variant; TemplateCode: Code[20]): Integer