2

I'm using the php SF api with the soap client. I've had a script running that pulls in some info from our SF database and does some stuff with it on our local database.

Before, this was the query I was using to grab the data from SF:

$query = "SELECT Id, Name, OwnerId, Product__c from Account WHERE Type LIKE 'Customer%'";

Recently, some new custom fields have been added, so I modified the query to include them:

$query = "SELECT Id, Name, OwnerId, CMM__c, Product__c, DCM_Lookup__c, ADCM__c, DAM__c from Account WHERE Type LIKE 'Customer%'";

However, the new fields aren't being returned. When I run this:

    $response = $this->mySforceConnection->query($query);   
    $queryResult = new QueryResult($response);
    foreach ($queryResult->records as $record) {
       print_r($record);
    }

All I get are the original fields being returned:

stdClass Object
(
[Id] => SomeClientId
[Name] => SomeClientName
[OwnerId] => SomeOwnerId
[Product__c] => SomeProduct
)

With the new ones not showing up. Just to check, I tried pulling this content with SalesForce's Apex data loader and the fields show up there. Also, I'm not getting any errors while running the code. I also updated the wsdl file, which hasn't seemed to do anything. Not really sure what is going on here?

1 Answer 1

1

Of course as soon as I post this, I answer the question. Apparently, for some reason, my script was referencing the old wsdl file. This I find very confusing since I updated the file. However, once I named it a different name, in both the script and on my server, everything works as it should.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .