I’m struggling to make a dataport with 2 items (Sales Header and Customer) result in one record. That is that fields from the Customer item are on the same record as fields from the Sales Header record. Does anybody know how to make this work ? Are there any properties for this, or do I have to make code ? I’m running Navision ver. 3.70a native. sincerely, Bjarte Ferstad
You’ll have to code it, I’m afraid. A Dataport will always output one line for each record and there is no property you can set to make it work otherwise.
Thanks Nelson, I’ll start finding out how to code this, then. …Bjarte
Basically all the code you need in the (Sales Header Data DataItem) is:
OnBeforeExportRecord() [IF NOT ] Customer.GET("Sales Header"."Sell-to Customer No.") [THEN CLEAR(Customer)]; The Customerfields can now be accessed directly from the Field Designers SourceExpr, i.e. Customer.Name, Customer.“Payment Terms Code” etc.