From 59e1a64f2d9bd0b84e7b05b2fdf12fe750bd1b7b Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 30 Jan 2013 14:09:32 +0000 Subject: [PATCH] REST services: fixed issue with returned external keys SVN:trunk[2594] --- core/restservices.class.inc.php | 5 +++++ webservices/itoprest.examples.php | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/restservices.class.inc.php b/core/restservices.class.inc.php index 2636b4cff..20f858315 100644 --- a/core/restservices.class.inc.php +++ b/core/restservices.class.inc.php @@ -99,8 +99,13 @@ class ObjectResult $value[] = $aLnkValues; } } + elseif ($oAttDef->IsExternalKey()) + { + $value = $oObject->Get($sAttCode); + } else { + // Still to be refined... $value = $oObject->GetEditValue($sAttCode); } } diff --git a/webservices/itoprest.examples.php b/webservices/itoprest.examples.php index eb27ac30c..f040b0c0f 100644 --- a/webservices/itoprest.examples.php +++ b/webservices/itoprest.examples.php @@ -150,7 +150,6 @@ foreach ($aOperations as $iOp => $aOperation) $response = DoPostRequest($sUrl, $aData); $aResults = json_decode($response); - $aResults = $response; if ($aResults) { echo "--------------------------------------\n";