The Order Entry sample does exactly what you are trying:

Customer
OrderHea
OrderDtl