2 tables / dataport

here i am again! i have got a dataport to export fields from the purchase line table. However, as the currency is not on the line, I wish to bring this through from the purchase header. In C/AL Globals I defined a new RECORD for purchase header (called PurchHeader) Then in source expression of my dataport field : PurchHeader.“Currency Code” This did not give any errors during compile, however all it does is produce a blank field. Am I missing something?! Thanks :smiley:

Maybe something like PurchHeader.GET(“Document Type”,“Document No.”); in Purchase Line DataItem?

thanks, but apologies for asking a simple question…[:I] but which/where “dataitem”

You said you have to export Purchase Line table… so it should be the Purchase Line DataItem and the OnBeforeExportRecord trigger.

Huh? “Currency Code” is field 91 on Purchase Line?

The currency code is in the purchase line table, you don’t need to get the header.