You can use any field and/or field combination as the primary key, there is no technical reason not to use a Code field.
The 'rule' is for certain types of tables in NAV, they are like common practice. For master tables for instance, the 'rule' is to use a Code20 type field. That doesn't mean that you can't create a master table with an integer field as the primary key, but by using those common practices your work will feel familiar to your users.
For me it is out of context. If I read this sentence, for me it means that if you want to use some text as part of primary key, recommanded is to use Code type an not Text type.
Comments
A primary key could even be a Integer. Even a single char!
Federico
MBS Specialist since NAV 2.0
My experiences on Linkedin
Maybe in a book... "Programming for newbies" or for dummies!
Federico
MBS Specialist since NAV 2.0
My experiences on Linkedin
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
The 'rule' is for certain types of tables in NAV, they are like common practice. For master tables for instance, the 'rule' is to use a Code20 type field. That doesn't mean that you can't create a master table with an integer field as the primary key, but by using those common practices your work will feel familiar to your users.
RIS Plus, LLC
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.