Archive for the ‘Salesforce API Development’ 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 Python Toolkit

I know this is not PHP-related, but I’ve released the first version of my Salesforce Python Toolkit, hosted by Google Code at http://code.google.com/p/salesforce-python-toolkit/. It’s released under the GNU Lesser General Public License (LGPL). Included in the tarball is an example for every method call and SOAP header in version 16.0 of the Salesforce [...]

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

Lead Generation via the Salesforce.com API vs. Web-to-Lead

What we mean by the term “lead generation via the API” is not the same concept as the term ‘Web-to-Lead’ that you may have heard. Creating leads via the API allows you to attach Salesforce functionality to your existing lead-generating forms, whereas Web-to-Lead is a tool provided by Salesforce that allows you auto-generate registration [...]

-->