Primary key and indexes
The primary key for a table is defined by going to View | Keys:
There are multiple keys or indexes defined here. In Dynamics NAV, the first key defined is automatically assigned as the primary key. In the case of the Sales Header table, the Document Type and No. fields are composite keys. Basically, these two fields are needed to keep the records in the table unique.
All of the subsequent keys that are defined are basically indexes that allow us to sort the content differently.
The SumIndexFields column allows us to quickly and efficiently calculate the sum of a column. You would typically use this if an index is used for calculation using a flowfield or through code.