Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stdClass Object
- (
- [errors] => Array
- (
- [0] => stdClass Object
- (
- [fields] => Array
- (
- [0] => ShippingStreet
- )
- [message] => Please enter the FULL Shipping Address for this Account
- [statusCode] => FIELD_CUSTOM_VALIDATION_EXCEPTION
- )
- )
- [id] =>
- [success] =>
- )
- SoapFault Object
- (
- [message:protected] => INVALID_FIELD: No such column 'ShippingStreet' on entity 'Opportunity'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
- [string:Exception:private] =>
- [code:protected] => 0
- [file:protected] => C:wampwwwcheckoutsalesforcesoapclientSforceBaseClient.php
- [line:protected] => 514
- [trace:Exception:private] => Array
- (
- [0] => Array
- (
- [file] => C:wampwwwcheckoutsalesforcesoapclientSforceBaseClient.php
- [line] => 514
- [function] => __call
- [class] => SoapClient
- [type] => ->
- [args] => Array
- (
- [0] => update
- [1] => Array
- (
- [0] => stdClass Object
- (
- [sObjects] => Array
- (
- [0] => SoapVar Object
- (
- [enc_type] => 301
- [enc_value] => stdClass Object
- (
- [Id] => xxxxREMOVED_IDxxxxxx
- [StageName] => Closed Won
- [CloseDate] => 2016-01-08
- [LeadSource] => Self-Service
- [Type] => New Business
- [Amount] => 6000
- [ShippingStreet] => 123 Test St
- )
- [enc_stype] => Opportunity
- [enc_ns] => urn:enterprise.soap.sforce.com
- )
- )
- )
- )
- )
- )
- define("SOAP_CLIENT_BASEDIR", "salesforce/soapclient");
- require_once (SOAP_CLIENT_BASEDIR.'/SforceEnterpriseClient.php');
- require_once (SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');
- $USERNAME="xxxxxxx";
- $PASSWORD="xxxxxxxxxxxxxxxxxxxxxxxxxxx";
- $sObject = new stdClass();
- $sObject->Id = $_SESSION['user']['sf_opportunityID'];
- //$sObject->AccountId = $_SESSION['user']['sf_accountID']; tried with and without this
- $sObject->StageName = 'Closed Won';
- $sObject->CloseDate = date('Y-m-d');
- $sObject->LeadSource = 'Self-Service';
- $sObject->Type = 'New Business';
- $sObject->Amount = 6000;
- $sObject->ShippingStreet = '123 Test St';
- $opportunityUpdateArray = array($sObject);
- try {
- $mySforceConnection = new SforceEnterpriseClient();
- $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');
- $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
- $updateOpportunityResponse = $mySforceConnection->update($opportunityUpdateArray, 'Opportunity');
- }catch (Exception $e) {
- echo $e->faultstring;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement