Codeunit 5505361 M365 Record Management
Codeunit 5505361 M365 Record Management
Methods
HandleTableFilter
procedure HandleTableFilter(tableId: Integer; tableFilterText: Text; doLookup: Boolean): Text
Handles lookup and validation of a TableFilter field.
Parameters / Return Value
tableId
Integer
Integer
tableFilterText
Text
Text - Please note: The filter is composed from the table name and field CAPTIONS!
doLookup
Boolean
Boolean
Returns
Text
Text
ApplyTableFilter
procedure ApplyTableFilter(tableFilterText: Text; var toRecRef: RecordRef)
Apply a table filter to a record reference.
Parameters / Return Value
tableFilterText
Text
The table filter as text.
toRecRef
RecordRef
The record reference to apply the filter to.
IsMatchingFilter
procedure IsMatchingFilter(textToFilter: Text[250]; filterExpression: Text): Boolean
Checks if a given text (textToFilter) matches the passed filter expression (filterExpression).
Parameters / Return Value
textToFilter
Text[250]
Text[250]
filterExpression
Text
Text
Returns
Boolean
Boolean
GetFiltersInFilterGroup
procedure GetFiltersInFilterGroup(recordVariant: Variant; fromFilterGroup: Integer; fieldId: Integer): Text
Return record or field filters set in a specific FilterGroup.
Parameters / Return Value
recordVariant
Variant
Variant
fromFilterGroup
Integer
Integer
fieldId
Integer
Integer
Returns
Text
Text
GetFiltersInFilterGroup
procedure GetFiltersInFilterGroup(recordVariant: Variant; filterGroup: Integer): Text
Return the record filters set in a specific FilterGroup.
Parameters / Return Value
recordVariant
Variant
Variant
filterGroup
Integer
Integer
Returns
Text
Text
CreateFilterFromGroup
procedure CreateFilterFromGroup(recordVariant: Variant; fieldId: Integer; filterPrefix: Text; var returnFilter: Text): Boolean
Returns a filter string based on a grouping of the recordVariant by the specified field ID. A filterPrefix is added for each found value.
Parameters / Return Value
recordVariant
Variant
Variant
fieldId
Integer
Integer
filterPrefix
Text
Text
returnFilter
Text
Text
Returns
Boolean
Boolean
CreateFilterFromGroup
procedure CreateFilterFromGroup(recordVariant: Variant; fieldId: Integer; var returnFilter: Text): Boolean
Returns a filter string based on a grouping of the recordVariant by the specified field ID.
Parameters / Return Value
recordVariant
Variant
Variant
fieldId
Integer
Integer
returnFilter
Text
Text
Returns
Boolean
Boolean
CreateNegativeFilterFromGroup
procedure CreateNegativeFilterFromGroup(recordVariant: Variant; fieldId: Integer; var returnFilter: Text): Boolean
Returns a negative filter string based on a grouping of the recordVariant by the specified field ID.
Parameters / Return Value
recordVariant
Variant
Variant
fieldId
Integer
Integer
returnFilter
Text
Text
Returns
Boolean
Boolean
GetView
procedure GetView(var recRef: RecordRef): Text
Returns the view applied to the recRef. Important: This function returns the en-US representation of the view.
Parameters / Return Value
recRef
RecordRef
The Record Reference to return the view for
Returns
Text
A view string
TrySetView
procedure TrySetView(var recRef: RecordRef; viewText: Text)
Parameters / Return Value
recRef
RecordRef
viewText
Text
TrySetView
procedure TrySetView(var filterPage: FilterPageBuilder; tableCaption: Text; viewText: Text)
Parameters / Return Value
filterPage
FilterPageBuilder
tableCaption
Text
viewText
Text
HandleView
procedure HandleView(tableId: Integer; viewText: Text; doLookup: Boolean): Text
Handles lookup and validation of a view.
Parameters / Return Value
tableId
Integer
Integer
viewText
Text
Text
doLookup
Boolean
Boolean
Returns
Text
Text
IsMatchingRecord
procedure IsMatchingRecord(recordVariant: Variant; viewText: Text): Boolean
Returns true, if the provided Record matches the passed View.
Parameters / Return Value
recordVariant
Variant
Variant
viewText
Text
Text
Returns
Boolean
Boolean
VariantToRecordReference
procedure VariantToRecordReference(recordVariant: Variant; var returnRecRef: RecordRef): Boolean
Converts a record-kind variant (Record, RecordId, RecordRef) or a table id to a corresponding RecordRef.
Parameters / Return Value
recordVariant
Variant
Variant
returnRecRef
RecordRef
RecordRef
Returns
Boolean
Boolean
VariantToRecordAndFieldReference
procedure VariantToRecordAndFieldReference(recordVariant: Variant; fieldId: Integer; var returnRecRef: RecordRef; var returnFldRef: FieldRef): Boolean
Converts a record-kind variant (Record, RecordId, RecordRef) or a table id to a corresponding RecordRef and in addition returns the requested Field reference.
Parameters / Return Value
recordVariant
Variant
Variant
fieldId
Integer
Integer
returnRecRef
RecordRef
RecordRef
returnFldRef
FieldRef
FieldRef
Returns
Boolean
Boolean
VariantToFieldReference
procedure VariantToFieldReference(recordVariant: Variant; fieldId: Integer; var returnFldRef: FieldRef): Boolean
Converts a record-kind variant (Record, RecordId, RecordRef) or a table id to a corresponding RecordRef and returns the requested Field reference.
Parameters / Return Value
recordVariant
Variant
Variant
fieldId
Integer
Integer
returnFldRef
FieldRef
FieldRef
Returns
Boolean
Boolean
IsNormalField
procedure IsNormalField(var fldRef: FieldRef): Boolean
Returns true if the passed fldRef references a regular field (no FlowField or FlowFilter).
Parameters / Return Value
fldRef
FieldRef
FieldRef
Returns
Boolean
Boolean
IsCalculableField
procedure IsCalculableField(var fldRef: FieldRef): Boolean
Returns true if the passed fldRef references a calculable field (like Blob).
Parameters / Return Value
fldRef
FieldRef
FieldRef
Returns
Boolean
Boolean
CalculateField
procedure CalculateField(var fldRef: FieldRef): Boolean
Calculates the passed fldRef if needed (i.e. the field is a Blob).
Parameters / Return Value
fldRef
FieldRef
FieldRef
Returns
Boolean
Boolean
FilterField
procedure FilterField(tableId: Integer; fieldId: Integer; var fieldRec: Record Field): Boolean
Filters a Field record and ensures, the returned field is enabled and not obsolete.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
fieldRec
Record "Field"
Record Field
Returns
Boolean
Boolean
IsNumericField
procedure IsNumericField(tableId: Integer; fieldId: Integer; raiseError: Boolean): Boolean
Returns true if the specified field is numeric. If raiseError is specified and the field is not of numeric type, an error is raised.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
GetFieldTypeFromVariant
procedure GetFieldTypeFromVariant(variantValue: Variant): FieldType
Returns the FieldType of a variant value.
Parameters / Return Value
variantValue
Variant
Variant
Returns
FieldType
FieldType
FormatRecordId
procedure FormatRecordId(recordVariant: Variant): Text
Formats the Record, RecordId, RecordRef to a human readable, translated value.
Parameters / Return Value
recordVariant
Variant
Variant
Returns
Text
Text
GetTableName
procedure GetTableName(tableVariant: Variant): Text[30]
Returns the name (not the caption) for a given table variant (Integer, Record, RecordRef, RecordId).
Parameters / Return Value
tableVariant
Variant
Variant
Returns
Text[30]
Text
GetTableCaption
procedure GetTableCaption(tableVariant: Variant): Text[249]
Returns the caption for a given table variant (Integer, Record, RecordRef, RecordId).
Parameters / Return Value
tableVariant
Variant
Variant
Returns
Text[249]
Text
ComposeRecordId
procedure ComposeRecordId(composeValue: Variant): Text
Compose a Record ID from subsequent calls to ComposeRecordId(). First call must supply a record number, following calls the values in order of the primary key.
Parameters / Return Value
composeValue
Variant
Variant
Returns
Text
Text
GetComposedRecordId
procedure GetComposedRecordId(var returnRecId: RecordId): Boolean
Returns the composed Record ID (ComposeRecordId()).
Parameters / Return Value
returnRecId
RecordId
RecordId
Returns
Boolean
Boolean
CopyRecordReference
procedure CopyRecordReference(var fromRecRef: RecordRef; var toRecRef: RecordRef; fieldId: Integer; withValidation: Boolean; nonEmptyFieldsOnly: Boolean; forceDeepCopy: Boolean)
Copy all fields of a record reference to another record reference. You can specify the field ID (fieldId), specify 0 if all fields should be copied, if fields should be validated (withValidation), and/or if only non-empty fields should be copyied (nonEmptyFieldsOnly). forceDeepCopy forces duplication of media/mediaset datatypes, even if they refer to the same record and field instance.
Parameters / Return Value
fromRecRef
RecordRef
RecordRef
toRecRef
RecordRef
RecordRef
fieldId
Integer
Integer
withValidation
Boolean
Boolean
nonEmptyFieldsOnly
Boolean
Boolean
forceDeepCopy
Boolean
Boolean
CopyRecordReference
procedure CopyRecordReference(var fromRecRef: RecordRef; var toRecRef: RecordRef; fieldId: Integer)
Copy all fields of a record reference to another record reference. You can specify the field ID (fieldId) to copy.
Parameters / Return Value
fromRecRef
RecordRef
RecordRef
toRecRef
RecordRef
RecordRef
fieldId
Integer
Integer
CopyRecordReference
procedure CopyRecordReference(var fromRecRef: RecordRef; var toRecRef: RecordRef)
Copy all fields of a record reference to another record reference.
Parameters / Return Value
fromRecRef
RecordRef
RecordRef
toRecRef
RecordRef
RecordRef
ClearRecordReferenceFields
procedure ClearRecordReferenceFields(var recRef: RecordRef)
Copy all fields of a record reference to another record reference.
Parameters / Return Value
recRef
RecordRef
RecordRef
GetSystemIdField
procedure GetSystemIdField(recRef: RecordRef; var returnFldRef: FieldRef): Boolean
Returns the Field Reference of the SystemId field.
Parameters / Return Value
recRef
RecordRef
Record Reference of the record to get the SystemId field from.
returnFldRef
FieldRef
The returned Field Reference of the SystemId field.
Returns
Boolean
True if the Field Reference was retrieved, false otherwise
GetSystemId
procedure GetSystemId(recRef: RecordRef): Guid
Returns the SystemId Guid of the passed Record Reference.
Parameters / Return Value
recRef
RecordRef
Record Reference of the record to get the SystemId from.
Returns
Guid
The SystemId Guid of the passed record or a null Guid.
GetKeyFields
procedure GetKeyFields(recordVariant: Variant; keyIndex: Integer; var returnKeyFields: List of [Integer]): Boolean
Returns a List of Integers representing the field IDs of the requested key index.
Parameters / Return Value
recordVariant
Variant
A Record variant to retrieve the key information from.
keyIndex
Integer
The index of the key in question (1-based).
returnKeyFields
List[Integer]
The returned Integer list with key field IDs.
Returns
Boolean
True if the key could be found and evaluated, false otherwise.
KeyFieldValuesDiffer
procedure KeyFieldValuesDiffer(firstRecRef: RecordRef; secondRecRef: RecordRef; keyIndex: Integer): Boolean
Returns true if the key fields of the specified key index are different in both Record References.
Parameters / Return Value
firstRecRef
RecordRef
A Record Reference.
secondRecRef
RecordRef
A Record Reference to compare against.
keyIndex
Integer
The index of the key in question (1-based).
Returns
Boolean
True if the key field values differ, false if they are equal.
PrimaryKeyFieldValuesDiffer
procedure PrimaryKeyFieldValuesDiffer(firstRecRef: RecordRef; secondRecRef: RecordRef): Boolean
Returns true if the primary key fields are different in both Record References.
Parameters / Return Value
firstRecRef
RecordRef
A Record Reference.
secondRecRef
RecordRef
A Record Reference to compare against.
Returns
Boolean
True if the primary key field values differ, false if they are equal.
RenameRecordReference
procedure RenameRecordReference(recRefToRename: RecordRef; pkRecRef: RecordRef): Boolean
Renames a Record Reference based on the SystemId field. The procedure supports up to 6 key fields.
Parameters / Return Value
recRefToRename
RecordRef
The Record Reference to rename.
pkRecRef
RecordRef
A Record Reference with the new primary key field values.
Returns
Boolean
True of renaming was successful, false otherwise.
FieldReferenceTypesAreEqual
procedure FieldReferenceTypesAreEqual(var fldRef: FieldRef; var testFldRef: FieldRef; raiseError: Boolean): Boolean
Returns true if both FieldReference types are equal. If raiseError is specified, an error is raised.
Parameters / Return Value
fldRef
FieldRef
FieldRef
testFldRef
FieldRef
FieldRef
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
FieldReferencesReferToSameInstance
procedure FieldReferencesReferToSameInstance(var fldRef: FieldRef; var testFldRef: FieldRef; raiseError: Boolean): Boolean
Returns true if both FieldReferences refer to the same Record and Field. If raiseError is specified, an error is raised.
Parameters / Return Value
fldRef
FieldRef
FieldRef
testFldRef
FieldRef
FieldRef
raiseError
Boolean
Boolean
Returns
Boolean
Boolean
CopyFieldReference
procedure CopyFieldReference(var fromFldRef: FieldRef; var toFldRef: FieldRef; withValidation: Boolean; nonEmptyFieldsOnly: Boolean; forceDeepCopy: Boolean)
Copies the value of one field reference to another field reference, taking Media and MediaSet types into account.
Parameters / Return Value
fromFldRef
FieldRef
FieldRef
toFldRef
FieldRef
FieldRef
withValidation
Boolean
Boolean
nonEmptyFieldsOnly
Boolean
Boolean
forceDeepCopy
Boolean
Boolean
CopyFieldReference
procedure CopyFieldReference(var fromFldRef: FieldRef; var toFldRef: FieldRef)
Copies the value of one field reference to another field reference, taking Media and MediaSet types into account.
Parameters / Return Value
fromFldRef
FieldRef
FieldRef
toFldRef
FieldRef
FieldRef
FindFields
procedure FindFields(tableId: Integer; var fieldRec: Record Field): Boolean
Filter Field Record for active fields in tableId.
Parameters / Return Value
tableId
Integer
Integer
fieldRec
Record "Field"
Record Field
Returns
Boolean
Boolean
GetField
procedure GetField(tableId: Integer; fieldId: Integer; var fieldRec: Record Field): Boolean
Return a Field Record in case the requested field is active.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
fieldRec
Record "Field"
Record Field
Returns
Boolean
Boolean
GetFieldName
procedure GetFieldName(tableId: Integer; fieldId: Integer): Text
Returns the name (not the caption) for given table and field IDs.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
Returns
Text
Text
GetFieldNumberByName
procedure GetFieldNumberByName(tableId: Integer; fieldName: Text; caseInsensitive: Boolean): Integer
Returns the corresponding field number for a tableId and fieldName.
Parameters / Return Value
tableId
Integer
Integer
fieldName
Text
Text
caseInsensitive
Boolean
Boolean
Returns
Integer
Integer
GetFieldNumberByName
procedure GetFieldNumberByName(tableId: Integer; fieldName: Text): Integer
Returns the corresponding field number for a tableId and fieldName.
Parameters / Return Value
tableId
Integer
Integer
fieldName
Text
Text
Returns
Integer
Integer
GetFieldLength
procedure GetFieldLength(tableId: Integer; fieldId: Integer): Integer
Returns the length of a field for given table ID and field ID.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
Returns
Integer
Integer
GetFieldOptionString
procedure GetFieldOptionString(tableId: Integer; fieldId: Integer): Text
Returns the option string of a field for given table ID and field ID.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
Returns
Text
Text
GetFieldOptionName
procedure GetFieldOptionName(tableId: Integer; fieldId: Integer; ordinalNumber: Integer): Text
Returns the option value/text of a field for given table ID, field ID, and ordinal number.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
ordinalNumber
Integer
Integer
Returns
Text
Text
GetFieldEnumValueName
procedure GetFieldEnumValueName(tableId: Integer; fieldId: Integer; ordinalNumber: Integer): Text
Returns the enumeration text value of an Enum field for the giben table ID, field ID, and ordinal number.
Parameters / Return Value
tableId
Integer
The ID of the table
fieldId
Integer
The ID of the field
ordinalNumber
Integer
The integer ordinal number of the enumeration
Returns
Text
The enumeration value name
GetFieldOptionCaptions
procedure GetFieldOptionCaptions(tableId: Integer; fieldId: Integer; lcid: Integer): Text
Returns the option caption string for a specific locale (lcid) for a field spcified by table ID and field ID.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
lcid
Integer
Integer
Returns
Text
Text
GetFieldOptionCaptions
procedure GetFieldOptionCaptions(tableId: Integer; fieldId: Integer): Text
Returns the option caption string for the current locale for a field spcified by table ID and field ID.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
Returns
Text
Text
GetFieldOptionCaption
procedure GetFieldOptionCaption(tableId: Integer; fieldId: Integer; ordinalNumber: Integer; lcid: Integer): Text
Returns the specific option caption for the specified locale (lcid) for a field spcified by table ID and field ID using the ordinal number ordinalNumber.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
ordinalNumber
Integer
Integer
lcid
Integer
Integer
Returns
Text
Text
GetFieldOptionCaption
procedure GetFieldOptionCaption(tableId: Integer; fieldId: Integer; ordinalNumber: Integer): Text
Returns the specific option caption for the current locale for a field spcified by table ID and field ID using the ordinal number ordinalNumber.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
ordinalNumber
Integer
Integer
Returns
Text
Text
GetFieldOptionAsNameValueBuffer
procedure GetFieldOptionAsNameValueBuffer(tableId: Integer; fieldId: Integer; lcid: Integer; var tempOptionsNameValueBuffer: Record "Name/Value Buffer" temporary): Boolean
Returns a temporary Name/Value Buffer table, filled with the option captions. The ID field contains the actual option number.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
lcid
Integer
Integer
tempOptionsNameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
Returns
Boolean
Boolean
GetFieldEnumValuesAsNameValueBuffer
procedure GetFieldEnumValuesAsNameValueBuffer(tableId: Integer; fieldId: Integer; lcid: Integer; var tempEnumNameValueBuffer: Record "Name/Value Buffer" temporary): Boolean
Returns a temporary Name/Value Buffer table, filled with the enum names, captions and ordinals.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
lcid
Integer
Integer
tempEnumNameValueBuffer
Record "Name/Value Buffer"
Record “Name/Value Buffer”
Returns
Boolean
Boolean
LookupFieldEnumValue
procedure LookupFieldEnumValue(tableId: Integer; fieldId: Integer; useCaption: Boolean; var ordinalName: Text; var ordinalValue: Integer): Boolean
Creates a lookup page for the enums specified by table ID and field ID and returns the selected enum name and value in ordinalName and ordinalValue. You can select to use the enum captions by specifying useCaption.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
useCaption
Boolean
Boolean
ordinalName
Text
Text
ordinalValue
Integer
Option
Returns
Boolean
Boolean
LookupFieldOption
procedure LookupFieldOption(tableId: Integer; fieldId: Integer; useCaption: Boolean; var ordinalName: Text; var ordinalValue: Option): Boolean
Creates a lookup page for the options specified by table ID and field ID and returns the selected option name and value in ordinalName and ordinalValue. You can select to use the option captions by specifying useCaption.
Parameters / Return Value
tableId
Integer
Integer
fieldId
Integer
Integer
useCaption
Boolean
Boolean
ordinalName
Text
Text
ordinalValue
Option
Option
Returns
Boolean
Boolean
GetRelationTable
procedure GetRelationTable(forRecordVariant: Variant; forFieldId: Integer; var returnRelatedTableId: Integer; var returnRelatedFieldId: Integer; raiseError: Boolean): Boolean
Returns relation information based on Table Relations Metadata and the passed record and field.
Parameters / Return Value
forRecordVariant
Variant
The record variant to evaluate the relation for.
forFieldId
Integer
The field id to evaluate the relation for.
returnRelatedTableId
Integer
The table id to which the relation refers.
returnRelatedFieldId
Integer
The field id to which the relation refers.
raiseError
Boolean
Raise an error if no relation is found.
Returns
Boolean
True if a proper relation was found, false otherwise.
GetRelationTable
procedure GetRelationTable(forRecordVariant: Variant; forFieldId: Integer; var returnRelatedFieldId: Integer; raiseError: Boolean): Integer
Returns relation information based on Table Relations Metadata and the passed record and field.
Parameters / Return Value
forRecordVariant
Variant
The record variant to evaluate the relation for.
forFieldId
Integer
The field id to evaluate the relation for.
returnRelatedFieldId
Integer
The field id to which the relation refers.
raiseError
Boolean
Raise an error if no relation is found.
Returns
Integer
The table id to which the relation refers.
GetRelatedRecordReference
procedure GetRelatedRecordReference(forRecordVariant: Variant; forFieldId: Integer; force: Boolean; var returnRelatedRecRef: RecordRef; var returnRelatedFldRef: FieldRef): Boolean
Returns the relation record reference and field reference for the passed record and field id.
Parameters / Return Value
forRecordVariant
Variant
The record for which the relation should be returned.
forFieldId
Integer
The field id for which the relation should be returned.
force
Boolean
If true, return an empty related record reference if the related record could not be found.
returnRelatedRecRef
RecordRef
The returned related record reference.
returnRelatedFldRef
FieldRef
The returned related field reference.
Returns
Boolean
True if the relation could be found, false otherwise.
GetRelatedRecordReference
procedure GetRelatedRecordReference(forRecordVariant: Variant; forFieldId: Integer; force: Boolean; var returnRelatedRecRef: RecordRef): Boolean
Returns the relation record reference for the passed record and field id.
Parameters / Return Value
forRecordVariant
Variant
The record for which the relation should be returned.
forFieldId
Integer
The field id for which the relation should be returned.
force
Boolean
If true, return an empty related record reference if the related record could not be found.
returnRelatedRecRef
RecordRef
The returned related record reference.
Returns
Boolean
True if the relation could be found, false otherwise.
LookupRecord
procedure LookupRecord(recordVariant: Variant; var returnRecordRef: RecordRef): Boolean
Performs a Table Lookup for the passed tableId and assigns the selected value to returnRecordRef.
Parameters / Return Value
recordVariant
Variant
A record variant as the table for lookup.
returnRecordRef
RecordRef
RecordRef: Contains the selected record.
Returns
Boolean
Boolean: Returns true if a record was selected, false otherwise.
LookupRecord
procedure LookupRecord(tableId: Integer; var returnRecordRef: RecordRef): Boolean
Performs a Table Lookup for the passed tableId and assigns the selected value to returnRecordRef.
Parameters / Return Value
tableId
Integer
Integer: Table ID of the table to do the lookup on.
returnRecordRef
RecordRef
RecordRef: Contains the selected record.
Returns
Boolean
Boolean: Returns true if a record was selected, false otherwise.
LookupRecord
procedure LookupRecord(recordVariant: Variant; var returnRecordId: RecordId): Boolean
Performs a Table Lookup for the passed tableId and assigns the selected record to returnRecordId.
Parameters / Return Value
recordVariant
Variant
A record variant as the table for lookup.
returnRecordId
RecordId
RecordId: Contains the selected record id.
Returns
Boolean
Boolean: Returns true if a record was selected, false otherwise.
LookupRecord
procedure LookupRecord(tableId: Integer; var returnRecordId: RecordId): Boolean
Performs a Table Lookup for the passed tableId and assigns the selected value to returnRecordId.
Parameters / Return Value
tableId
Integer
Integer: Table ID of the table to do the lookup on.
returnRecordId
RecordId
RecordId: Contains the ID of the selected record.
Returns
Boolean
Boolean: Returns true if a record was selected, false otherwise.
LookupRelatedValue
procedure LookupRelatedValue(baseRecordVariant: Variant; baseFieldId: Integer; var targetFieldRef: FieldRef): Boolean
Does a lookup (if possible) for a specific field in a record. In case it has a relation to another table, this table is shown for lookup. If the field type is an Option, an Option selection dialog is shown. Else the procedure returns false.
Parameters / Return Value
baseRecordVariant
Variant
The record for whose field a lookup is to be performed.
baseFieldId
Integer
The field ID for which a lookup is to be performed.
targetFieldRef
FieldRef
The target field reference into which the value should be validated.
Returns
Boolean
True, if a lookup was possible and the validation of the targetFieldRef was successful, false otherwise.
LookupRelatedValue
procedure LookupRelatedValue(baseRecordVariant: Variant; baseFieldId: Integer; var targetFieldRef: FieldRef; forceValidate: Boolean): Boolean
Does a lookup (if possible) for a specific field in a record. In case it has a relation to another table, this table is shown for lookup. If the field type is an Option, an Option selection dialog is shown. Else the procedure returns false.
Parameters / Return Value
baseRecordVariant
Variant
The record for whose field a lookup is to be performed.
baseFieldId
Integer
The field ID for which a lookup is to be performed.
targetFieldRef
FieldRef
The target field reference into which the value should be validated.
forceValidate
Boolean
Does a Validate of the target field.
Returns
Boolean
True, if a lookup was possible and the validation of the targetFieldRef was successful, false otherwise.
LookupRelatedValue
procedure LookupRelatedValue(baseTableId: Integer; baseFieldId: Integer; var targetFieldRef: FieldRef; forceValidate: Boolean): Boolean
Does a lookup (if possible) for a specific field in a record. In case it has a relation to another table, this table is shown for lookup. If the field type is an Option, an Option selection dialog is shown. Else the procedure returns false.
Parameters / Return Value
baseTableId
Integer
The table id for whose field a lookup is to be performed.
baseFieldId
Integer
The field ID for which a lookup is to be performed.
targetFieldRef
FieldRef
The target field reference into which the value should be validated.
forceValidate
Boolean
Does a Validate of the target field.
Returns
Boolean
True, if a lookup was possible and the validation of the targetFieldRef was successful, false otherwise.
LookupRelatedValue
procedure LookupRelatedValue(baseTableId: Integer; baseFieldId: Integer; var targetFieldRef: FieldRef): Boolean
Does a lookup (if possible) for a specific field in a record. In case it has a relation to another table, this table is shown for lookup. If the field type is an Option, an Option selection dialog is shown. Else the procedure returns false.
Parameters / Return Value
baseTableId
Integer
The table id for whose field a lookup is to be performed.
baseFieldId
Integer
The field ID for which a lookup is to be performed.
targetFieldRef
FieldRef
The target field reference into which the value should be validated.
Returns
Boolean
True, if a lookup was possible and the validation of the targetFieldRef was successful, false otherwise.
LookupObject
procedure LookupObject(forObjectType: ObjectType; var returnObjectId: Integer; var returnObjectCaption: Text[249]): Boolean
Lookup an Object ID and Caption.
Parameters / Return Value
forObjectType
ObjectType
Specify the object type you are looking for.
returnObjectId
Integer
Returns the object ID when successful, used as a preselection if a valid ID is passed.
returnObjectCaption
Text[249]
Returns the object caption when successful.
Returns
Boolean
True if lookup was successful, false otherwise.
ValidateObject
procedure ValidateObject(forObjectType: ObjectType; objectIdentifier: Text; var returnObjectId: Integer; var returnObjectCaption: Text[249]): Boolean
Validates an object identifier (can be an object id, object name, object caption) and returns the respective object ID and object caption.
Parameters / Return Value
forObjectType
ObjectType
Specify the object type you are validating.
objectIdentifier
Text
Identifier as object id, object name, or object caption.
returnObjectId
Integer
Returns the identifiers object id if successful.
returnObjectCaption
Text[249]
Returns the identifiers object caption if successful.
Returns
Boolean
True if successful, false otherwise.
LookupTable
procedure LookupTable(var returnTableId: Integer; var returnTableCaption: Text[249]): Boolean
Lookup a Table ID and Caption.
Parameters / Return Value
returnTableId
Integer
Returns the table id when successful, used as a preselection if a valid ID is passed.
returnTableCaption
Text[249]
Returns the table caption when successful.
Returns
Boolean
True if lookup was successful, false otherwise.
ValidateTable
procedure ValidateTable(tableIdentifier: Text; var returnTableId: Integer; var returnTableCaption: Text[249]): Boolean
Validates a table identifier (can be an object id, object name, object caption) and returns the respective table id and table caption.
Parameters / Return Value
tableIdentifier
Text
Identifier as table ID, table name, or table caption.
returnTableId
Integer
Returns the identifiers table id if successful.
returnTableCaption
Text[249]
Returns the identifiers table caption if successful.
Returns
Boolean
True if successful, false otherwise.
LookupField
procedure LookupField(forTableId: Integer; var returnFieldId: Integer; var returnFieldCaption: Text[80]): Boolean
Lookup a field for the specified table id.
Parameters / Return Value
forTableId
Integer
Specify the table id for the lookup.
returnFieldId
Integer
Returns the selected field id if successful. A preselection can be passed to position the record.
returnFieldCaption
Text[80]
Returns the caption of the selected field.
Returns
Boolean
True of successful, false otherwise.
ValidateField
procedure ValidateField(forTableId: Integer; fieldIdentifier: Text; var returnFieldId: Integer; var returnFieldCaption: Text[80]): Boolean
Validates a field identifier (can be a field id, field name, field caption) and returns the respective field id and field caption.
Parameters / Return Value
forTableId
Integer
Specify the table you are looking in.
fieldIdentifier
Text
Identifier as field id, field name, or field caption.
returnFieldId
Integer
Returns the identifiers field id if successful.
returnFieldCaption
Text[80]
Returns the identifiers field caption if successful.
Returns
Boolean
True if successful, false otherwise.
GetNextEntryNo
procedure GetNextEntryNo(tableId: Integer; fieldId: Integer): BigInteger
Returns a new Entry No. for a Record with an Entry No. Primary Key. No plausibility checks are done for performance. It is not checked, if the passed fieldId refers to the PK nor if the field is a (Big)Integer.
Parameters / Return Value
tableId
Integer
The ID for the table to get the next Entry No. for
fieldId
Integer
The field ID representing the Entry No. (Big)Integer field
Returns
BigInteger
BigInteger with the next free Entry No.
GetNextLineNumber
procedure GetNextLineNumber(recordVariant: Variant; lineNumberFieldNo: Integer; var lineNo: Integer; var isLastRecord: Boolean): Boolean
Determines the next Line Number for a record.
Parameters / Return Value
recordVariant
Variant
Variant
lineNumberFieldNo
Integer
Integer
lineNo
Integer
var Integer. Contains the next line number to use. Pass -1 to force getting a number after the last record.
isLastRecord
Boolean
var Boolean. Specifies if the passed record is the last in the filter set.
Returns
Boolean
Boolean
GetLineNumberSteps
procedure GetLineNumberSteps(recordVariant: Variant; lineNumberFieldNo: Integer; numberOfRecords: Integer; var returnLineStep: Integer): Boolean
Determines the proper Line Number steps to insert a specific number of records.
Parameters / Return Value
recordVariant
Variant
Variant
lineNumberFieldNo
Integer
Integer
numberOfRecords
Integer
Integer. The number of records to insert.
returnLineStep
Integer
var Integer. Returns the steps to use to allow inserting between existing records.
Returns
Boolean
Boolean
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.