Table 18122345 EOS Record Ident. Buffer

Table 18122345 EOS Record Ident. Buffer

Provides easy conversions from and to a SourceType-SourceSubtype-SourceId-Pair to a RecorcRef. Also serves as a record identification buffer for function abstraction.

LanguageCaption
da-DKRecord Identification Buffer
de-DERecord Identification Buffer
es-ESRegistro de identificación de búfer
fr-FRRecord Identification Buffer
en-USRecord Identification Buffer
it-ITRecord Identification Buffer
nl-NLRecord Identification Buffer

Fields

Entry No. (1)

Integer

The primary key.

LanguageCaption
da-DK# Nr
de-DELfd. Nr.
es-ESEntrada Nº
fr-FRNo. d’entrée
en-USEntry No.
it-ITNr. movimento
nl-NLEntry No.

Source Type (10)

Integer

The Table ID of the record.

LanguageCaption
da-DKKilde Type
de-DEHerkunftsart
es-ESTipo de fuente
fr-FRType de Source
en-USSource Type
it-ITTipo origine
nl-NLBron Type

Source Subtype (11)

Option

"0" (0) , "1" (1) , "2" (2) , "3" (3) , "4" (4) , "5" (5) , "6" (6) , "7" (7) , "8" (8) , "9" (9) , "10" (10)

The Document Type (if applicable) of the record.

LanguageCaption
da-DKKilde Undertype
de-DEHerkunftsunterart
es-ESSubtipo fuente
fr-FRSource Subtype
en-USSource Subtype
it-ITSottotipo origine
nl-NLSource Subtype

Source ID (12)

Code[20]

The ID / “No.” of the record. This contains the template name for journal line type records.

LanguageCaption
da-DKKilde-ID
de-DEHerkunfts-ID
es-ESID de origen
fr-FRID Source
en-USSource ID
it-ITID origine
nl-NLBron ID

Source Batch Name (13)

Code[10]

The batch name of the record. Only valid for journal line type records.

LanguageCaption
da-DKKilde Kladdenavn
de-DEHerkunftsbuch.-Blattname
es-ESFuente Nombre del lote
fr-FRLot Nom de la source
en-USSource Batch Name
it-ITNome batch origine
nl-NLBron batchnaam

Source Prod. Order Line (14)

Integer

The prod. order line no..

LanguageCaption
da-DKKilde Prod. Bestil Linje
de-DEHerkunfts-FA-Zeile
es-ESProd fuente. Fila para ordenar
fr-FRProd Source. Ligne de commande
en-USSource Prod. Order Line
it-ITRiga origine ord. produz.
nl-NLBron Prod. Bestel Line

Source Ref. No. (15)

Integer

The source ref. no.. This will mostly be the “Line No.". For entry tables, this will contain the entry no.

LanguageCaption
da-DKKilde Ref. Ingen.
de-DEHerkunftsref.-Nr.
es-ESRef fuente. No.
fr-FRRef Source. Non.
en-USSource Ref. No.
it-ITNr. rif. origine
nl-NLBron Ref. Nee.

Version No. (16)

Integer

The version no., applicable only to sales / purchase archive tables.

LanguageCaption
da-DKUdgave nr
de-DEVersionsnr.
es-ESVersión no
fr-FRVersion No.
en-USVersion No.
it-ITNr. versione
nl-NLVersie No.

Doc. No. Occurrence (17)

Integer

The doc. no. occurrence, applicable only to sales / purchase archive tables.

LanguageCaption
da-DKDok. No. Forekomst
de-DEBelegnr.-Häufigkeit
es-ESDoc. Nº Ocurrencia
fr-FRDoc. Présence n °
en-USDoc. No. Occurrence
it-ITOccorrenza nr. doc.
nl-NLDoc. Voorkomen No.

Source GUID (18)

guid

The Source GUID, applicable to systemID field and other guid based field.

LanguageCaption
da-DKKilde-GUID
de-DEQuell-GUID
es-ESGUID de origen
fr-FRSource GUID
en-USSource GUID
it-ITGUID origine
nl-NLBron-GUID

Record ID (20)

RecordID

An instance of a RecordId that represents the record.

LanguageCaption
da-DKrecord ID
de-DEDatensatz-ID
es-ESIdentificación del registro
fr-FRID d’enregistrement
en-USRecord ID
it-ITID record
nl-NLRecord ID

Company Name (21)

Text[30]

The company name of the record.

LanguageCaption
da-DKfirmanavn
de-DEMandantenname
es-ESNombre de empresa
fr-FRNom de la compagnie
en-USCompany Name
it-ITNome società
nl-NLBedrijfsnaam

Description (40)

Text[500]

An optional description field. This is only when using the lookup page.

LanguageCaption
de-DEBeschreibung
en-USDescription
it-ITDescrizione

Methods

GetTable

procedure GetTable("Table": Variant): Boolean

Loads a given record into the buffer, decoding it into a SourceType-SourceSubtype-SourceId-Pair.

Parameters / Return Value

  • Table Variant

    The record to load into the buffer. Must be a record or a recordref pointing to a table.

  • Returns Boolean

    true if the record was successfully decoded.


DecodeRecord

procedure DecodeRecord(RecordVariant: Variant): Boolean

Decodes a record variant into the buffer fields.

Parameters / Return Value

  • RecordVariant Variant

    The record variant to decode. Can be a record or RecordRef.

  • Returns Boolean

    true if the record was successfully decoded.


DecodeRecord

procedure DecodeRecord(RecRef: RecordRef): Boolean

Decodes a RecordRef into the buffer fields by analyzing its primary key structure.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef to decode.

  • Returns Boolean

    true if the record was successfully decoded.


CreateRecRef

procedure CreateRecRef(var RecRef: RecordRef): Boolean

Creates an instance of a RecordRef by using the SourceType-SourceSubtype-SourceId-Pair fields on the record. Note: The targetted record must exist.

Parameters / Return Value

  • RecRef RecordRef

    The resulting RecordRef.

  • Returns Boolean

    true if the value could be encoded and the record exists. false otherwise.


ShowCard

procedure ShowCard()

Opens the default card page for the current record.


IsPostedDocument

procedure IsPostedDocument(): Boolean

Indicates if the current record is a posted document.

Parameters / Return Value

  • Returns Boolean

    true if the current record points to a posted document.


IsArchivedDocument

procedure IsArchivedDocument(): Boolean

Indicates if the current record is an archived document.

Parameters / Return Value

  • Returns Boolean

    true if the current record points to an archived document.


AddToBuffer

procedure AddToBuffer(DocVariant: Variant)

Addes a record to the buffer. This is mostly the same as GetTable, but this also inserts the resulting record.

Parameters / Return Value

  • DocVariant Variant

    The record to load into the buffer. Must be a record or a recordref pointing to a table.


AddToBufferByType

procedure AddToBufferByType(SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20]; SourceBatchName: Code[10]; SourceLineNo: Integer; SourceProdOrderLineNo: Integer; SourceSystemId: Guid)

Adds a record to the buffer. See also AddToBuffer.

Parameters / Return Value

  • SourceType Integer

    The SourceSubtype.

  • SourceSubtype Integer

  • SourceNo Code[20]

    The Source No.

  • SourceBatchName Code[10]

    The Source Batch Name.

  • SourceLineNo Integer

    The Source Line No.

  • SourceProdOrderLineNo Integer

    The Prod. Order Line No.

  • SourceSystemId Guid

    The Source System ID.


AddToBufferByType

procedure AddToBufferByType(SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20]; SourceBatchName: Code[10]; SourceLineNo: Integer; SourceProdOrderLineNo: Integer)

Adds a record to the buffer. See also AddToBuffer.

Parameters / Return Value

  • SourceType Integer

    The SourceSubtype.

  • SourceSubtype Integer

  • SourceNo Code[20]

    The Source No.

  • SourceBatchName Code[10]

    The Source Batch Name.

  • SourceLineNo Integer

    The Source Line No.

  • SourceProdOrderLineNo Integer

    The Prod. Order Line No.


AddToBufferByType

procedure AddToBufferByType(SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20]; SourceLineNo: Integer)

Adds a record to the buffer. See also AddToBuffer.

Parameters / Return Value

  • SourceType Integer

    The SourceSubtype.

  • SourceSubtype Integer

  • SourceNo Code[20]

    The Source No.

  • SourceLineNo Integer

    The Source Line No.


DecodeCopyDocumentPurchDocType

procedure DecodeCopyDocumentPurchDocType(Value: Integer): Boolean

Decodes the purchase DocumentType that is used by Copy Document Mgt. into a source-type/subtype/id pair.

Parameters / Return Value

  • Value Integer

    The document type.

  • Returns Boolean

    true if the document type was decoded successfully.


DecodeCopyDocumentPurchDocType

procedure DecodeCopyDocumentPurchDocType(Value: Integer; WithError: Boolean): Boolean

Decodes the purchase DocumentType that is used by Copy Document Mgt. into a source-type/subtype/id pair.

Parameters / Return Value

  • Value Integer

    The document type.

  • WithError Boolean

    If true, a runtime error is raised if the passed document type could not be decoded.

  • Returns Boolean

    true if the document type was decoded successfully.


DecodeCopyDocumentSalesDocType

procedure DecodeCopyDocumentSalesDocType(Value: Integer): Boolean

Decodes the sales DocumentType that is used by Copy Document Mgt. into a source-type/subtype/id pair.

Parameters / Return Value

  • Value Integer

    The document type.

  • Returns Boolean

    true if the document type was decoded successfully.


DecodeCopyDocumentSalesDocType

procedure DecodeCopyDocumentSalesDocType(Value: Integer; WithError: Boolean): Boolean

Decodes the sales DocumentType that is used by Copy Document Mgt. into a source-type/subtype/id pair.

Parameters / Return Value

  • Value Integer

    The document type.

  • WithError Boolean

    If true, a runtime error is raised if the passed document type could not be decoded.

  • Returns Boolean

    true if the document type was decoded successfully.


GetTableType

procedure GetTableType(DocVariant: Variant): Enum "EOS004 Table Type"

Determines the table type by analyzing the primary key structure of a table.

Parameters / Return Value

  • DocVariant Variant

    The record variant to analyze. Can be a record or RecordRef.

  • Returns Enum "EOS004 Table Type"

    The table type enum value.


GetTableType

procedure GetTableType(TableID: Integer): Enum "EOS004 Table Type"

Determines the table type by analyzing the primary key structure of a table.

Parameters / Return Value

  • TableID Integer

    The table ID to analyze.

  • Returns Enum "EOS004 Table Type"

    The table type enum value indicating the key structure pattern (Entry, Doc, TypedDoc, etc.).


GetSubtypeFieldNo

procedure GetSubtypeFieldNo(DocVariant: Variant): Integer

Gets the field number of the subtype field for a given record variant.

Parameters / Return Value

  • DocVariant Variant

    The record variant to analyze. Can be a record or RecordRef.

  • Returns Integer

    The field number of the subtype field, or 0 if the table has no subtype field.


GetSubtypeFieldNo

procedure GetSubtypeFieldNo(TableID: Integer): Integer

Gets the field number of the subtype field for a given table ID.

Parameters / Return Value

  • TableID Integer

    The table ID to analyze.

  • Returns Integer

    The field number of the subtype field (typically Document Type), or 0 if the table has no subtype field.


GetDescription

procedure GetDescription(): Text[500]

Generates a human-readable description of the record based on its table, subtype, source ID, and line number. Can be customized via events.

Parameters / Return Value

  • Returns Text[500]

    A formatted description text.


Duplicate

procedure Duplicate(var TempOutBuffer: Record "EOS Record Ident. Buffer")

Duplicates the contents of the buffer without sharing the instance.

Parameters / Return Value

  • TempOutBuffer Record "EOS Record Ident. Buffer"

    The new buffer.


AssignDescription

procedure AssignDescription(force: Boolean)

Assigns a default description to all records in this instance. You have the option whether to overwrite existing descriptions.

Parameters / Return Value

  • force Boolean

    If true, existing descriptions will be overwritten.


Lookup

procedure Lookup(): Boolean

Opens a lookup page for selecting a record from the buffer.

Parameters / Return Value

  • Returns Boolean

    true if a record was selected, false if the lookup was cancelled.


Lookup

procedure Lookup(Title: Text): Boolean

Opens a lookup page for selecting a record from the buffer with a custom title.

Parameters / Return Value

  • Title Text[]

    The title to display on the lookup page.

  • Returns Boolean

    true if a record was selected, false if the lookup was cancelled.


LookupMultiple

procedure LookupMultiple(var TempSelectedRecords: Record "EOS Record Ident. Buffer"): Boolean

Opens a lookup page for selecting multiple records from the buffer.

Parameters / Return Value

  • TempSelectedRecords Record "EOS Record Ident. Buffer"

    The temporary buffer to populate with the selected records.

  • Returns Boolean

    true if one or more records were selected, false if the lookup was cancelled.


LookupMultiple

procedure LookupMultiple(Title: Text; var TempSelectedRecords: Record "EOS Record Ident. Buffer"): Boolean

Opens a lookup page for selecting multiple records from the buffer with a custom title.

Parameters / Return Value

  • Title Text[]

    The title to display on the lookup page.

  • TempSelectedRecords Record "EOS Record Ident. Buffer"

    The temporary buffer to populate with the selected records.

  • Returns Boolean

    true if one or more records were selected, false if the lookup was cancelled.


Events

OnGetTableType

local procedure OnGetTableType(var IsPosted: Boolean; var IsArchived: Boolean; var Handled: Boolean)

An event that checks if a table is a posted document or an archived document. If this event is not handled, both values default to false. Most common NAV tables are already handled.

Parameters / Return Value

  • IsPosted Boolean

    Set this to true, if the record is a posted document.

  • IsArchived Boolean

    Set this to true, if the record is an archived document.

  • Handled Boolean

    Set this to true if you handled the request.


OnBeforeGetSubtypeFieldNo

local procedure OnBeforeGetSubtypeFieldNo(var RecRef: RecordRef; TableType: Enum "EOS004 Table Type"; var Result: Integer; var Handled: Boolean)

Raised before determining the subtype field number for a table.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef being analyzed.

  • TableType Enum "EOS004 Table Type"

    The determined table type.

  • Result Integer

    The subtype field number result.

  • Handled Boolean

    Set to true if the event handler has determined the result.


OnAfterGetSubtypeFieldNo

local procedure OnAfterGetSubtypeFieldNo(var RecRef: RecordRef; TableType: Enum "EOS004 Table Type"; var Result: Integer)

Raised after determining the subtype field number for a table.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef being analyzed.

  • TableType Enum "EOS004 Table Type"

    The determined table type.

  • Result Integer

    The subtype field number result that can be modified.


OnBeforeGetTableType

local procedure OnBeforeGetTableType(var RecRef: RecordRef; var CouldBeArchive: Boolean; var TableType: Enum "EOS004 Table Type"; var Handled: Boolean)

Raised before determining the table type by analyzing primary key structure.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef being analyzed.

  • CouldBeArchive Boolean

    Indicates if the table name suggests it could be an archive table.

  • TableType Enum "EOS004 Table Type"

    The determined table type that can be set by the handler.

  • Handled Boolean

    Set to true if the event handler has determined the table type.


OnAfterGetTableType

local procedure OnAfterGetTableType(var RecRef: RecordRef; CouldBeArchive: Boolean; var TableType: Enum "EOS004 Table Type")

Raised after determining the table type by analyzing primary key structure.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef being analyzed.

  • CouldBeArchive Boolean

    Indicates if the table name suggests it could be an archive table.

  • TableType Enum "EOS004 Table Type"

    The determined table type that can be modified.


OnBeforeDecodeRecord

local procedure OnBeforeDecodeRecord(var RecRef: RecordRef; var Success: Boolean; var Handled: Boolean)

Raised before decoding a RecordRef into buffer fields.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef to decode.

  • Success Boolean

    Set to true if the decode was successful.

  • Handled Boolean

    Set to true if the event handler has performed the decoding.


OnAfterDecodeRecord

local procedure OnAfterDecodeRecord(var RecRef: RecordRef; var Success: Boolean)

Raised after decoding a RecordRef into buffer fields.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef that was decoded.

  • Success Boolean

    Indicates if the decode was successful and can be modified.


OnBeforeCreateRecRef

local procedure OnBeforeCreateRecRef(var RecRef: RecordRef; var Success: Boolean; var IsHandled: Boolean)

Raised before creating a RecordRef from the buffer fields.

Parameters / Return Value

  • RecRef RecordRef

    The RecordRef to create.

  • Success Boolean

    Set to true if the RecordRef was successfully created.

  • IsHandled Boolean

    Set to true if the event handler has performed the creation.


OnBeforeGetDescription

local procedure OnBeforeGetDescription(Rec: Record "EOS Record Ident. Buffer"; var DescriptionText: Text; var IsHandled: Boolean)

Raised before getting the description of the record.

Parameters / Return Value

  • Rec Record "EOS Record Ident. Buffer"

    The EOS Record Ident. Buffer record.

  • DescriptionText Text[]

    The description text.

  • IsHandled Boolean

    Gets or sets if the event is handled.


OnAfterGetDescription

local procedure OnAfterGetDescription(Rec: Record "EOS Record Ident. Buffer"; var DescriptionText: Text)

Raised after the description for a record was retrieved.

Parameters / Return Value

  • Rec Record "EOS Record Ident. Buffer"

    The EOS Record Ident. Buffer record.

  • DescriptionText Text[]

    The description text.



EOS Labs -