Archive for the ‘PHP Toolkit’ Category

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 [...]

How to Use the Entire Salesforce API, Part One (Core Calls, Enterprise 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 [...]

Salesforce Gotchas and Undocumented ‘Features’

Today we’re going to go through some things that I hope you find interesting and informative, things that hopefully will make your development process a lot easier. With many of the following issues, I’ve found the documentation either sparse, obscured, or non-existent.
- Objects (such as individual leads or contacts) have either a 15-character or [...]

Creating a Lead via the Salesforce.com API

In our next installment, we’re going to take a closer look the lead generation code from the end the first post, as well as finish getting your SFDC development environment set up.
Choosing the Right WSDL For You and Your Organization
Salesforce uses SOAP as its Web Services protocol, and SOAP uses an XML file [...]

-->