You need to sign in to do that
Don't have an account?
Thenmozhi
how to get contact field in php to salesforce integration
i am trying to get records from contact table here, i got id vales ,but i didn't get Name,Firstname values got some error like
Notice: Undefined property: stdClass::$Contact in E:\xampp\htdocs\php-toolkit\user_login_session\getRecors.php on line 54
Notice: Trying to get property of non-object in E:\xampp\htdocs\php-toolkit\user_login_session\getRecors.php on line 54
$query = "SELECT Id,Name,FirstName from Contact ";
$response = $mySforceConnection->query($query);
foreach ($response->records as $record)
{
echo '<tr><td>'.$record->Id[0].'</td> (its working)
<td>'.$record->fields->Name.'</td></tr>'; (here my error)
}
Notice: Undefined property: stdClass::$Contact in E:\xampp\htdocs\php-toolkit\user_login_session\getRecors.php on line 54
Notice: Trying to get property of non-object in E:\xampp\htdocs\php-toolkit\user_login_session\getRecors.php on line 54
$query = "SELECT Id,Name,FirstName from Contact ";
$response = $mySforceConnection->query($query);
foreach ($response->records as $record)
{
echo '<tr><td>'.$record->Id[0].'</td> (its working)
<td>'.$record->fields->Name.'</td></tr>'; (here my error)
}
Eg:
$records[0] = new SObject();
$records[0]->Id = $ids;
$records[0]->fields = array(
'Name' =>$lastname,
'Title__c'=>$title,
'First_name__c' =>$firstname,
'Php_order_id__c'=>$id
);