Is there a way through code to tell if a field is part of a tables primary key?
I would like to be able to determine this through code because the table is being referenced via RecordRef. So I don't necessarily know what table I'm dealing with. I want to be able to determine if the field I'm working with is part of the primary key of RecordRef. This way if I need to change the value of the field I'll know if I need to do a MODIFY or a RENAME.
Sorry to sound repetitive but I want to be clear, this may seem like an odd request.
Thanks in advance.
My mommy says I'm special
0
Answers
This code will give you the numbers of the fields which appears in the Primary Key. The name of the field can be looked up in the Virtual Table "Field".
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
http://www.BiloBeauty.com
http://www.autismspeaks.org