Custom Fields Not Displayed in SalesForce API Request

I have a custom date field for accounts in SalesForce: LastCheckedDate (API name: LastCheckedDate__c)

I am trying to use the SalesForce Enterprise API to request accounts based on this field. It returns the results, and I can use the custom field in the WHERE part of the query, but I cannot force it to actually show me the value of the custom field in the results.

This PHP code should get me the ID, name and LastCheckedDate of any account that was verified in 2011:

$query = "SELECT Id,Name,LastCheckedDate__c FROM Account WHERE LastCheckedDate__c > 2011-01-01"; $response = $salesforceConnection->query($query); foreach ($response->records as $record) { print_r($record); } 

It correctly returns only those accounts that were verified in 2011, but the result does not include the value of this custom field:

 stdClass Object ( [Id] => 0015000000abcdefgh [Name] => Bob Widget Factory ) 

How can I get it to include LastCheckedDate in result objects?

+6
source share
2 answers

It looks like you have the same problem as in this question: SalesForce.com: getting custom fields through PHP .

This is due to the way you process the returned data.

+4
source

Update the wsdl file. Thus, you cannot select or update any field that is not in the wsdl file.

+7
source

Source: https://habr.com/ru/post/888863/


All Articles