Archive for December 2009

Catching Salesforce Exceptions

Pretty simple, but for those new to PHP or to exception handling:

// instantiate a SOAP connection to Salesforce
// catch Salesforce exception if there is one
try {
$crmHandle->createConnection(SALESFORCE_WSDL);
} catch (Exception $e) {
// handle exception – did you set the WSDL path above?

// print out the exception string
echo $e->getMessage();
}

If an [...]

How to Use the Entire Salesforce API, Part Three (Describe Calls, Enterprise and Partner WSDL Formats)

Here is part three of the series documenting the Salesforce API when used with the PHP Toolkit, where we’re going to cover the method calls under the ‘Describe Calls’ section of the API documentation. Note that this post applies to both the Enterprise and Partner WSDL formats.
Prerequisites
All examples below assume the Toolkit has been [...]

How to Use the Entire Salesforce API, Part Two (Core Calls, Partner WSDL format)

These posts are modeled after the EXAMPLES file that ships with the Salesforce Python Toolkit, in which I wrote snippets of code on how to use all the method calls in the Salesforce API spec. The posts will be modeled after the four sections of the Salesforce API docs; so they will be ‘Core [...]

-->