Question
How to access specific columns of the Line Items in the Invoice document definition in the export script?
Answer
The columns can be accessed as follows in the export script:
Document.Field("Invoice Layout\\LineItems").Items[<instance_id>].Field("<FieldName>");
For example, the following C# export script will log the value of the Order Number in the first row:
var myTable = Document.Field("Invoice Layout\\LineItems");
var tableField = myTable.Items[0].Field("OrderNumber");
Processing.ReportMessage("table field value: " + tableField.Value);
Comments
1 comment
Ranjit Nayak
Hi
Can someone help me on this. I want to check sum of linetotal of each line and compare with invoice total. Can someone guide, how to take this.
TIA
Please sign in to leave a comment.