The record-based manipulation is used to manipulate one record at a time. The typical usage of record-based manipulation is when you need to manipulate only one record or if you have to manipulate many records and you are unable to use the set-based operators or would like to commit each record at a time.
In the following sections, we will look closer at the insert, update, and delete operations.
Perhaps the most common method to manipulate tables in AX is to insert them using the insert()
method. It is used to insert the data currently held in a table variable (an object) to a new record in the database (that is, the data is physically committed to the database). The insert()
method in X++ is a table instance method and so it is performed on a table variable, which is also referred to as a table buffer.
This means that the insert()
method will only be able to insert one record in the database at a time.
If you need to insert multiple records, you will have to...