You need to sign in to do that
Don't have an account?
SrBlanco
PHP: Unable to update custom fields with Enterprise 1.1
ARGH!!
So using the example from the wiki as my guide:
Code:
I am able to update standard fileds in cases wihtout issue. I cannot, however get custom fields to update.
When I do a getLastRequest I cannot even see my custom fields referenced in the SOAP call. Someone please point me in the right direction on updating custom fields through the Enterprise 1.1 api.
My code below:
Code:
So using the example from the wiki as my guide:
Code:
http://wiki.apexdevnet.com/index.php/Members:PHP_Toolkit_1.1_Update_Sample_%28Enterprise%29
I am able to update standard fileds in cases wihtout issue. I cannot, however get custom fields to update.
When I do a getLastRequest I cannot even see my custom fields referenced in the SOAP call. Someone please point me in the right direction on updating custom fields through the Enterprise 1.1 api.
My code below:
Code:
require_once ('soapclient/SforceEnterpriseClient.php'); require_once ('soapclient/SforceHeaderOptions.php'); try { $sfc_connection = new SforceEnterpriseClient(); $mySoapClient = $sfc_connection->createConnection("enterprise.wsdl.xml"); $sfc_login = $sfc_connection->login("SFC_USR", "SFC_PWD"); $userResult = $sfc_login->userInfo; echo $userResult->userFullName . ', your session id is ' . $sfc_login->sessionId; $sObject1 = new stdClass; $sObject1->Subject = 'Test issue 1'; $sObject1->zzTest__c = 'text'; $sObject1->Id = '50020000000hl5kAAA'; print_r($sObject1); $response = $sfc_connection->update(array ($sObject1), "Case"); print_r($response); print_r($sfc_connection->getLastRequest()); print_r($sfc_connection->getLastResponse()); } catch (Exception $e) { echo $e->faultstring; }
For example:
Code:
Code:
Unfortunitely it still wouldnt update the custom field. The standard field (Subject) updated just fine though which is quite perpelexing.
Hi, I had a very similar issue with the Ajax toolkit. Not sure if the requirements are the same or not.
With the Ajax toolkit, I could only update the custom field if it was placed on a "Page Layout".
I also ran into issues with non-admin users updating it if it was marked as read only.
Hope this info helps
Good Luck
Don
Thanks for posting. Unfortunitely none of your suggestions are the answer. The custom field I am trying to update exists on a page layout, is not read-only, and I am using my admin creds in the script to try and update it.
-Michael
You are once again my hero. Updating the enterprise.wsdl did the trick.
Clearly I am missing some fundamental concepts. Can anyone point me to some good "beginner" documentation on accessing sfdc through the API?
Thanks,
Michael