Related field not to primary key

LinSpace
Member Posts: 3
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
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
0
Comments
-
Can you not do what you want with the stadndard salesperson code on the salesheader.
Bruce0 -
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?0 -
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 72With best regards from Switzerland
Marcus Fabian0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions