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

Debtor_FindByPartialName & Debtor_GetDataArray php

0
$debtorHandles = $client->Debtor_FindByPartialName(array('partialName' => $partitialName))->Debtor_FindByPartialNameResult->DebtorHandle; //Finder debitorer der matcher det indtastede $num = count($debtorHandles); $debtorDataObjects =$client->Debtor_GetDataArray(array('entityHandles' => $debtorHandles))->Debtor_GetDataArrayResult->DebtorData; //Henter alle data på de matchene debitorer $num_2 = count($debtorDataObjects); If $num = 1 then $num_2 = 0 Why is $num_2 = 0 ?? if $num = 2 then $num_2 = 2 And so on Only problem is when i get 1 post from Debtor_FindByPartialName!! WHY?
created Sep 25, 2015 by suulut
50% Accept Rate
Q 8 A 5 C 2

1 Answer

0
 
Best answer

Because Debtor_GetDataArray handles from two and more debtors. With only one debtor, use the:

$debtorDataObjects = $client->Debtor_GetData(array('entityHandle' => $debtorHandles))->Debtor_GetDataResult;

 

answered Oct 5, 2015 by suulut
Visma e-conomic A/S
...