Table relation / Lookup

Hi, I have a funny feeling this could be a noddy type question but I have been asked to change the sales header so when the ship-to code is looked up it pulls all records that a) don’t have a customer code b) have the same customer number as the sell-to customer code. I figured fairly straight forward but seem to be having difficulty. I am looking at the table realtion option but everytime I manage it I either get 0 records or all To do this changed the key in the ship-to address table so it is just code Am I going the correct/ best way round it? How do I say I want to select records WHERE customer no. = sell to customer no. OR customer no. = ‘’? Would be most grateful if anyone could help.

EDIT: Sry, want to write something else but … i can’t delete my post now :wink:

Hi Chris, it looks like you are going through a design and development process, without the design part. There should not be any ship-to’s without a customer, so what exactly are you trying to do. I think once you answer that question, the how will become obvious.

Thanks for the response. My company is a plastics manufacturer for several customers (300). However we are only a part process in the manufacturing. The customer will place an order but we will then ship it to one of 30/40 plants that will finish the production. In Some instances customers do specify there own site and then then will forward it on to the manufacturing plants. What I am trying to do is prevent the necessity for each of the 30/40 ship to addresses to be re-keyed. The obvious way was to remove the link to the customer field but have the ability to use it if filled. Does that make sense?

I am sure it makes sense, and probably would have made sense if you clarified it in the begining. What you are doing, is not the correct way to do this, since you should never change the Relationships and table structure in Navision. The simplest solution would be to create a new customer as a template customer, and then add a new ship to field, and link this field to the address you want. Then the client will have two options, a/ shipt to the customer on the order, or select a different cutomer to ship-to. iN this way you are not breaking any of the Navision database structure.