Related field not to primary key

LinSpaceLinSpace Member Posts: 3
edited 2000-12-15 in Navision Financials
I am a relatively inexperienced developer and need some basic help.

I would like to assign each sales order to an employee. I have made a new field, “Assigned” in table 36, Sales Header. I set the relationship for the field to the employee table. My only problem is that the field I want to stored in the Sales Header is the Search Name, not the employee number. How do I do this?

Note: Each Search Name is Unique

Comments

  • brucembrucem Member Posts: 86
    Can you not do what you want with the stadndard salesperson code on the salesheader.

    Bruce
  • LinSpaceLinSpace Member Posts: 3
    No, because an employee other than the salesperson is assigned to the sales order.

    I guess that I can connect using the employee primary key, then add another field to the sales header for the search name, but I did not want to add 2 fields. Any other suggestions?
  • mfabianmfabian Member Posts: 187
    From the point of view of relational db design it doesn't make sense to add a foreign-key field to a table. Remember: "Search Name" is not unique! It can exist once, n-times or not at all. You have to add the employee No. to the sales order table even if you don't show it. Then you add the "Assigned" as flow-field which is defined as lookup via the hidden empno in sales order.

    Marcus


    Marcus Fabian
    m.fabian@thenet.ch
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
Sign In or Register to comment.