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

Question about syntax

0
I update a product like this :

$ProductGetAll=$client->Product_GetData(array('entityHandle'=>array('Number'=>'test1234')))->Product_GetDataResult;
$ProductGetAll->RecommendedPrice=105;    
$update_product=$client->Product_UpdateFromData(array('data'=>$ProductGetAll))->Product_UpdateFromDataResult;

If I omit "Product_UpdateFromDataResult" in my last line, I still get an update of my product. What is the correct syntax here ?
created Sep 9, 2014 by larsbrandi
0% Accept Rate
Q 3 A 2 C 3

1 Answer

0

Hi, 

Both ways you can update your Product. Only thing that differ is return value. Try to print $update_product with the last line and without last line.

If you want to get the id of updated product, then you should do :

$update_product=$client->Product_UpdateFromData(array('data'=>$ProductGetAll))->Product_UpdateFromDataResult->Number;

answered Sep 13, 2014 by Wisdmlabs
Visma e-conomic A/S
...