I have a simple user contact object (called API Contact__c) that I created on my SalesForce DE website, which has one field (for connection testing) Full_Name__c.
Then I try to get all the contacts, in particular this field via PHP:
try { $mySforceConnection = new SforcePartnerClient(); $mySoapClient = $mySforceConnection->createConnection(API_PATH . '/soapclient/partner.wsdl'); $mylogin = $mySforceConnection->login(API_USER, API_PASS . API_SECURITY_TOKEN); $query = 'SELECT C.Id, C.Full_Name__c FROM Contact__c C'; $result = $mySforceConnection->query($query); $sObject = new SObject($result->records[0]); print_r($sObject); } catch(Exception $e) { print_r($e); }
I downloaded the latest version of partner.wdsl (although, as a WSDL partner, it is freely typed and does not need to be downloaded with the creation / addition of custom objects and / or updated fields, right?). I checked that the user can connect and see user fields through ForceExplorer. But when I run the above code, it connects, but returns only the following:
SObject Object ( [type] => Contact__c [fields] => [Id] => a )
I do not get any errors, invalid field errors, etc., but for life I can not understand why this does not work.
I saw this example here, but it seems to be specific to Enterprise vs Partner, and you need to download the latest version of enterprise.wsdl every time you change custom fields.
Any pointers?
Paul mennega
source share