Printing Country/Region of Origin Code Field from Item Table in Sales Order Line.

mysamzamysamza Member Posts: 66
I need to print the Country/Region of Origin Code from the Item Card on the Line Items of the Order Confirmation report I am modifying.
Here is what I have done so far but failed to make it work.

I first wrote the following code on the Sales Line's OnAfterRecordTrigger

IF ItemCont.GET("Sales Line"."No.") then;

ItemCont is a variable of record type for Item Table.

Then, in the dataitem(RoundLoop; "Integer") I wrote the following code;

column("Goods"; ItemCont."Country/Region of Origin Code")
{

}
And added the Goods field in RDL to the Line Table.

Thanks in Advance for the Help.

Answers

  • JuhlJuhl Member Posts: 724
    Make sure you use the right sales line variable to get item.
    When using loops, sometimes there are 2 line variables. Like “Sales Line” and SalesLine.
    Follow me on my blog juhl.blog
  • SanderDkSanderDk Member Posts: 502
    What error are you getting?
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • mysamzamysamza Member Posts: 66
    It won't print. I was adding the code to GET it in the Sales Line Dataitem. I had to do it in the RoundLoop. I got it fixed!
Sign In or Register to comment.