Hi,
I'm only new to dataports in navision and i am having an issue getting a value from a second table.
I have a Sales Invoice Line data item where i read the sales invoice line data. I also need to read and export the item cross reference.
So i setup a global variable called
crossref with a datatype RECORD and subtype "item cross reference".
i also have setup a variable call crossrefno
I then use the following GET statement
crossref.GET("No.");
crossrefno := crossref."Cross-Reference No.";
"No." is the item number in the sales invoice line
When i compile, everything is fine. When i run the dataport i get the following error.....
"The Item cross reference does not exist. Identification fields and values:
Item No.='102-01-02750',Variant Code=", Unit of Measure..........other fields from the cross reference table"
I can't see where i am going wrong. :?
I have done the exact same thing with the sales invoice header to get values from that table and it works perfectly. (got help from another member on how to do this )
Do i need to get data from the cross reference table in a different way?
Thanks for your help.
0
Comments
I assume that you should use different key and apply filter on ItemcrossRef. First, change CurrentKey to "Cross-Reference No.", then setrange with value of field "Cross-Reference No." from "Sales Line", Findfirst or Find('-').
how can you do a get with only one of the primary key fields?
use (put your values instead of the name of the fields)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I was under the impression that the "Get" statement would retreive the record where ("no.") from from my Sales Invoice Line matched the "Item No." in the Cross reference table.
Then i assign the various values to variables which i output in my dataport. for example itemcrossref := crossref."Item No.";
"itemcrossref" being the variable i write in the dataport.
"crossref" being the global variable setup to store the record that matched the item no.
Thanks
Daniel.