How to access specific columns of the Line Items in the Invoice document definition

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);

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.