Record Data Type

Version: Available or changed with runtime version 1.0.

Is a complex data type.

Instance methods

The following methods are available on instances of the Record data type.

Method name Description
AddLink(Text [, Text]) Adds a link to a record.
AddLoadFields([Any,...]) Specifies fields to be initially loaded when the record is retrieved from its data source. Subsequent calls to AddLoadFields will not overwrite fields already selected for the initial load.
AreFieldsLoaded(Any,...) Checks whether the specified fields are all initially loaded.
Ascending([Boolean]) Gets or sets the order in which the system searches through a table.
CalcFields(Any [, Any,...]) Calculates the FlowFields in a record. You specify which fields to calculate by using parameters.
CalcSums(Any [, Any,...]) Calculates the total of a column in a table. You specify which fields to calculate by using parameters.
ChangeCompany([Text]) Redirects references to table data from one company to another.
ClearMarks() Removes all the marks from a record.
Consistent(Boolean) Marks a table as being consistent or inconsistent.
Copy(Record [, Boolean]) Copies a specified record's filters, views, automatically calculated FlowFields, marks, fields, and keys that are associated with the record from a table or creates a reference to a record.
CopyFilter(Any, Any) Copies the filter that has been set for one field and applies it to another field.
CopyFilters(var Record) Copies all the filters set by the SETFILTER method (Record) or the SETRANGE method (Record) from one record to another.
CopyLinks(var Record) Copies all the links from a specified record.
CopyLinks(RecordRef) Copies all the links from a specified record.
Count() Counts the number of records in a table.
CountApprox() Returns an approximate count of the number of records in the table, for example, for updating progress bars or displaying informational messages.
CurrentCompany() Gets the current company of a database table record.
CurrentKey() Gets the current key of a database table.
Delete([Boolean]) Deletes a record in a table.
DeleteAll([Boolean]) Deletes all records in a table that fall within a specified range.
DeleteLink(Integer) Deletes a specified link from a record in a table.
DeleteLinks() Deletes all of the links that have been added to a record.
FieldActive(Any) Checks whether a field is enabled.
FieldCaption(Any) Gets the current caption of the specified field as a string.
FieldError(Any [, Text]) Stops the execution of the code causing a run-time error, and creates an error message for a field.
FieldError(Any, ErrorInfo) Stops the execution of the code causing a run-time error, and creates an error message for a field.
FieldName(Any) Gets the name of a field as a string.
FieldNo(Any) Gets the number assigned to a field in the table description.
FilterGroup([Integer]) Gets or sets the filter group that is applied to a table.
Find([Text]) Finds a record in a table that is based on the values stored in keys.
FindFirst() Finds the first record in a table based on the current key and filter.
FindLast() Finds the last record in a table based on the current key and filter.
FindSet([Boolean]) Finds a set of records in a table based on the current key and filter.
FindSet(Boolean, Boolean) Finds a set of records in a table based on the current key and filter.
Get([Any,...]) Gets a record based on values stored in primary key fields.
GetAscending(Any) Gets the sort order for the records returned. You can use GETASCENDING to identify the sort order of the specified field because fields can be sorted in ascending or descending order. For example, you can read data from an ODATA web service where the data is sorted in ascending order on the Name field but in descending order on the City field.
GetBySystemId(Guid) Gets a record by its SystemId.
GetFilter(Any) Gets a list of the filters within the current filter group that are applied to a field.
GetFilters() Gets a string that contains a list of the filters within the current filter group for all fields in a record. In addition, this method also returns the state of the MARKEDONLY method (Record).
GetPosition([Boolean]) Gets a string that contains the primary key of the current record.
GetRangeMax(Any) Gets the maximum value in a range for a field.
GetRangeMin(Any) Gets the minimum value in a range for a field.
GetView([Boolean]) Gets a string that describes the current sort order, key, and filters on a table.
HasFilter() Determines whether a filter is attached to a record within the current filter group.
HasLinks() Determines whether a record contains any links.
Init() Initializes a record in a table.
Insert() Inserts a record into a table without executing the code in the OnInsert trigger.
Insert(Boolean) Inserts a record into a table.
Insert(Boolean, Boolean) Inserts a record into a table.
IsEmpty() Determines whether a table or a filtered set of records is empty.
IsTemporary() Determines whether a record refers to a temporary table.
LoadFields(Any,...) Accesses the table's corresponding data source and loads the values of the specified fields on the record.
LockTable([Boolean] [, Boolean]) Starts locking on a table to protect it from write transactions that conflict with each other.
Mark([Boolean]) Marks a record. You can also use this method to determine whether a record is marked.
MarkedOnly([Boolean]) Activates a special filter. After you use this function, your view of the table includes only records marked by the Mark (Record) method.
Modify([Boolean]) Modifies a record in a table.
ModifyAll(Any, Any [, Boolean]) Modifies a field in all records within a range that you specify.
Next([Integer]) Steps through a specified number of records and retrieves a record.
ReadConsistency() Determines if the table supports read consistency.
ReadIsolation([IsolationLevel]) Gets or sets the read isolation level.
ReadPermission() Determines whether a user is granted read permission to the table that contains a record. This method can test for both full read permission and partial read permission that has been granted with a security filter.
RecordId() Gets the RecordId of the record that is currently selected in the table. If no table is selected, an error is generated.
RecordLevelLocking() Determines whether the table supports record-level locking.
Relation(Any) Determines the table relationship of a given field.
Rename(Any [, Any,...]) Changes the value of a primary key in a table.
Reset() Removes all filters, including any special filters set by MarkedOnly, changes fields select for loading back to all, and changes the current key to the primary key. Also removes any marks on the record and clears any AL variables defined on its table definition.
SecurityFiltering([SecurityFilter]) Gets or sets how security filters are applied to the record.
SetAscending(Any, Boolean) Sets the sort order for the records returned. Use this method after you have set the keys to sort after, using SETCURRENTKEY. The default sort order is ascending. You can use SETASCENDING to change the sort order to descending for a specific field, while the other fields in the specified key are sorted in ascending order.
SetAutoCalcFields([Any,...]) Sets the FlowFields that you specify to be automatically calculated when the record is retrieved from the database.
SetBaseLoadFields() Sets that only fields for the base table to be initially loaded when the record is retrieved from its data source. This will overwrite fields previously selected for initial load.
SetCurrentKey(Any [, Any,...]) Selects a key for a table.
SetFilter(Any, Text [, Any,...]) Assigns a filter to a field that you specify.
SetLoadFields([Any,...]) Sets the fields to be initially loaded when the record is retrieved from its data source. This will overwrite fields previously selected for initial load.
SetPermissionFilter() Applies the user's security filter.
SetPosition(Text) Sets the fields in a primary key on a record to the values specified in the supplied string. The remaining fields are not changed.
SetRange(Any [, Any] [, Any]) Sets a simple filter, such as a single range or a single value, on a field.
SetRecFilter() Sets the values in the current key of the current record as a record filter.
SetView(Text) Sets the current sort order, key, and filters on a table.
TableCaption() Gets the current caption of a table as a string.
TableName() Gets the name of a table.
TestField(Any) Tests that the content of the field is not zero or blank (empty string).
TestField(Any, ErrorInfo) Tests that the content of the field is not zero or blank (empty string).
TestField(Any, Boolean) Tests whether the contents of a field match a given value.
TestField(Any, Boolean, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Integer) Tests whether the contents of a field match a given value.
TestField(Any, Integer, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, BigInteger) Tests whether the contents of a field match a given value.
TestField(Any, BigInteger, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Decimal) Tests whether the contents of a field match a given value.
TestField(Any, Decimal, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Guid) Tests whether the contents of a field match a given value.
TestField(Any, Guid, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Text) Tests whether the contents of a field match a given value.
TestField(Any, Text, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Label) Tests whether the contents of a field match a given value.
TestField(Any, Label, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, TextConst) Tests whether the contents of a field match a given value.
TestField(Any, TextConst, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Code) Tests whether the contents of a field match a given value.
TestField(Any, Code, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Text) Tests whether the contents of a field match a given value.
TestField(Any, Text, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Enum) Tests whether the contents of a field match a given value.
TestField(Any, Enum, ErrorInfo) Tests whether the contents of a field match a given value.
TestField(Any, Any) Tests whether the contents of a field match a given value.
TestField(Any, Any, ErrorInfo) Tests whether the contents of a field match a given value.
TransferFields(var Record [, Boolean]) Copies all matching fields in one record to another record.
TransferFields(var Record, Boolean, Boolean) Copies all matching fields in one record to another record.
Validate(Any [, Any]) Calls the OnValidate trigger for the field that you specify.
WritePermission() Determines whether a user can write to a table. This method can test for both full write permission and partial write permission that has been granted with a security filter. A write permission consists of Insert, Delete, and Modify permissions.

See Also

Get Started with AL
Developing Extensions