API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Get InvoiceLines on by invoice number how to?



Im trying to get all InvoiceLines of a specific invoice.


I can get all line by using Invoice.GetAll(); But how to get only a specific invoice?
created Jun 13, 2014 by LasseBang
0% Accept Rate
Q 1 A 0 C 1

1 Answer

var objInvoice = session.Invoice.FindByNumber(someNumber);
var lines = objInvoice.GetLines();


Best regards,
answered Jun 14, 2014 by Christian Estrup

Im using SDK, can you make me an example?
A tad more explicitly:

int invoiceNumberToSearchFor = 227;
IInvoice objInvoice = session.Invoice.FindByNumber(invoiceNumberToSearchFor);

IInvoiceLine[] lines = objInvoice.GetLines();

// lines now holds an array of the lines of the invoice.

Visma e-conomic A/S