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

CurrentInvoice_FindByOrderNumber missing?

0

When an order is changed to a invoice draft and later booked I can use:

Invoice_FindByOrderNumber 

To locate the invoice(s)

But when the invoicedraft hasn't been booked i have no way to find the draft

I was searching for an CurrentInvoice_FindByOrderNumber  or equivalent

created Aug 1, 2016 by Hoyer
0% Accept Rate
Q 14 A 2 C 12

1 Answer

0
Hi Hoyer

CurrentInvoice_FindByOrderNumber would be exactly the method if such one existed. Alas it does not.
We recommend using the field "OtherReference" and _FindByOtherReference which is supported across all 4 sales documents types (Quotation, Order, CurrentInvoice, Invoice) as well as on REST /invoices.

Locating a draft invoice based on the originating order number is not supported though. Only once booked is this available.
answered Aug 1, 2016 by olej
I looks like the REST api doent support filtering on the OrderNumber neither?
OtherReference wont help since the quotations/orders are created by the user manually (in e-conomic).

We therefore have an quotation/order reference (economicid and number) - when the user changes an quotation to an order (in e-conomic) we can (try to) find the order searcing for an order with the same number af the original quotation.

But when an quotation/order is converted to an draft invoice we don't know what happened to the quotation/order - was it deleted? was it converted to an draft invoice?

Once the draft invoice is booked, we can make the "match".
You're right that we're not exposing the originating order number via REST on booked invoices (hence no filtering either). I've added this as a feature request along with the request for it on drafts.

The only way I currently see to retrieve what you're asking for via SOAP is scraping the info from the PDF.
Visma e-conomic A/S
...