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

Set YourReference on order creation

0
Hi

I'm having som problems figuring out how to set the debtors reference while creating a new order.

Made a selectbox with the contact's number as value and name as shown text.

What is the most smooth way of setting orderData.YourRefence to the chosen contact?

Guess that I expected something like debtor.getDebtorContacts.FindByNumber(contactSelectField.selecteditem.value)
but such function isn't there.

My code so far :

Public Sub createOrder() Handles createOrderButtonClick

        Dim eC = ECLogin()

        Dim debtor As IDebtor = eCDebtorFindByNumber(3) ' number to be replaced by something dynamic

        Dim orderData = eCOrderCreate(debtor)
        orderDataHeading = createOrderHeadingText

        eCOrderCreateFromData(orderData)

        eCDisconnect()


    End Sub



/ Ulrik
created Oct 21, 2012 by ulriknedergaard
67% Accept Rate
Q 3 A 4 C 0

1 Answer

0
 
Best answer
Hi Ulrik,

There is a GetDebtorContacts on the debtor, but no way in the api to filter those.

You would have to do it manually.
answered Oct 22, 2012 by nkn
selected Sep 12, 2013 by ulriknedergaard
Visma e-conomic A/S
...