diff --git a/src/Phpforce/SoapClient/Soap/SoapClient.php b/src/Phpforce/SoapClient/Soap/SoapClient.php index bd90617..10a5e13 100755 --- a/src/Phpforce/SoapClient/Soap/SoapClient.php +++ b/src/Phpforce/SoapClient/Soap/SoapClient.php @@ -40,6 +40,12 @@ public function getSoapTypes() preg_match('/\s* (.*) (.*);/', $line, $matches); $properties[$matches[2]] = $matches[1]; } + + // Since every object extends sObject, need to append sObject elements to all native and custom objects + if ($typeName !== 'sObject' && array_key_exists('sObject', $this->types)) { + $properties = array_merge($properties, $this->types['sObject']); + } + $this->types[$typeName] = $properties; } }