The properties of the query object can be accessed by highlighting the first empty line after the object name and clicking on Ctrl + spacebar. The properties of the query we created earlier will look like this:
We'll review three of these properties:
- OrderBy: This provides the capability to define a sort, data column by column, and ascending or descending, giving the same result as if a key had been defined for the query result, but without the requirement for a key.
- TopNumberOfRows: This allows for the specification of the number of data rows that will be presented by the query. A blank or 0 value shows all rows. Specifying a limit can make the query complete much faster. This property can also be set dynamically from the AL code.
- ReadState: This controls the state (committed or not) of data that is included and the type of lock that is placed on the data read.