+ Start a Discussion
rchoi21rchoi21 

php_sforce_nusoap update

Hi,

An update to the php_sforce_nusoap sourceforge project has been posted. It includes support for setURL() and setSession(), as well as doing lead converts.

http://sourceforge.net/project/showfiles.php?group_id=96634&package_id=166314

I've also updated the example php file with a lead convert example.

Please send comments and feedback to rchoi21_AT_hotmail.com.

Thanks!

Ryan Choi
rchoi21_AT_hotmail.com
aboydaboyd
Hi. Is there a reason why I can't update a lead? I just took your code for updating a contact, and changed it to be "Lead" but it doesn't work. I'm obviously missing something basic. Here's the code:

$queryResult = $sfdc->query("SELECT id FROM Lead WHERE Email='$email'");
if (isset($queryResult['records'][0]['Email'])) {
$contact1 = new sObject(
'Lead',
$queryResult['records'][0]['id'],
array(
'DownloadedFiles' => $temp_data
)
);
$updateResult = $sfdc->update($contact1);
}

If I print the $queryResult array, it is populated with an id. But $sfdc->update isn't updating. Why?

-Tony
rchoi21rchoi21
Tony,

Do you have any error message that was returned? You can either pull it out programatically or get the entire message body with the call:

print_r($sfdc->client->response)

thanks!

ryan
aboydaboyd
Ryan,

Thanks for getting back to me. I did manage to resolve this. It was a comedy of errors. I had everything wrong. It's all working now. I have another question. I'll post it in a new topic. Thanks.

-Tony