NAV 2013 - Field error because table relation looks at primary key,

MarcusRBMarcusRB Member Posts: 40
I have the field "User" which has a table relation to the "User Name" field in the "User" table.

I receive an error when I try to enter the value of the field manually instead of using the lookup form. If I enter a correct User Name, I get the following error:

pfkts5dmnn26.jpg

yggw5ykag7a9.jpg

I think this is because of the primary key in the "User" table, as it is set to the Users "Security ID" which is a GUID.

What I want to know, is if there is a way to fix this small problem.

I could set the "Editable" property of the field to "False", however then one doesn't get the dropdown indicator....

Best Answer

Answers

  • MarcusRBMarcusRB Member Posts: 40
    Check the property of the User field in your table. There are two properties ValidateTableRelation and TestTableRelation in there, both should be set to No. In addition the the validation should be coded in OnValidate trigger.

    Double check the TableRelation property - it should be se to User."User Name" but I guess you left only the "User" table in there, without specyfing the "User Name" field, which in fact set the relation to the User."Security ID" field, which is a PK on User table


    Check the T91 User Setup how it should be done.

    The TableRelation was set correctly (User."User Name"), however I had not set the Validate and Test properties to no.

    Thanks for the help!
Sign In or Register to comment.