Dynamics 365 Business Central: How to get fields in the keys of the table (Using KeyRef Data Type)

Today I would like to talk about an interesting method in Business Central customization, how to get fields in the keys of the table.

As you might know, in AL, a key definition is a sequence of one or more field IDs from a table. You can define keys in table objects and table extension objects, depending on the type of key. There are two types of keys: primary and secondary.

Source : Dynamics 365 Lab
Read more…