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

Attention handle issue when saving/updating current order

0
Hi e-conomic
I need to change the Debtor on an order.
 
I do the following:
  • get the order-data with Order_Getdata
  • Find the new debtor with Debtor_FindByNumber
  • Set the DebtorHandle on the order-data
  • Set the AttentionHandle on the order-data (the attetionhandle of the Debtor just found)
  • Then I perform an Order_UpdateFromData
And i get an integrityException: "The attention of the current order does not belong to the new debtor."
 
Sometimes there is no attention on the debtor - maybe this could be the reason - but assigning an attention on a debtor is optional - right?
 
A question like this has been asked before (same headline - just for an invoice instead of an order). As far as I can see I'm following the directions on that post - but it seems like the post was not "closed" properly.
mvh Susanne
created Jan 12, 2016 by suro
20% Accept Rate
Q 5 A 1 C 1

1 Answer

0
Hi Suro

At it's current state you will need to updateFromData twice. First remove the attention handle. Then update with new debtorhandle and attention handle if necessary.
answered Jan 12, 2016 by olej
Visma e-conomic A/S
...