So, I have created the Drupal Salesforce module on the basis of Steve McKenzie's important work in this regard.

This blog entry, and other coming after it, I can imagine, deal with my experience getting the module operational and following the announced roadmap (see module description).

Getting started

The first step I took was wisely signing up as a member of the Apex Developer Network, where there are a lot of resources, info, docs, kits and general warm and fuzzies which are great when one is immersing oneself in a new development environment.

I headed over to the signup page , and immediately got a free membership and a free developer (two user) Salesforce account to play around with. I logged into the account at the CRM Online start page , and, well, played around with my account some. I hit the account tab and hit the Go! button to see all of my accounts, and saw that there were already a bunch of accounts set up. There were leads, too, and contacts. Plenty of stuff to start diving in without having to spend a lot of time importing play-dough data.

Now anxious to get my first Salesforce hello world app going, I headed back to the developer page and chose the API link from the left-hand side menu. This took me to the appropriate API wiki page , and sure enough, there were the words "Getting Started", and I was beginning to feel at home. Well, I started downloading a ton of handbooks, manuals, samples, etc., and finally scrolled down to the language-specific sections, to lay my hands on some straight PHP stuff before starting to analyze old Steve's work on the existing module (which said something about Salesforce API version 6...). So I brazenly downloaded the latest PHP toolkit to get started with (leaving for later some interesting stuff there, including an Oracle to Salesforce sample).

Installing the PHP Toolkit

Now, of course, you do not need to install anything to get the Drupal Salesforce module working, I am simply relating my own experiences with actually getting the module going and onto its Roadmap path, so you can probably safely skip this part, unless you're the kind that likes this sort of thing.

I untarred the PHP Toolkit into a folder in my apache document root and, as per the instructions (instructions.html in the toolskit) named it sforce-php.

After reading these instructions, I then went into the samples folder and edited the file HelloWorld.php, around line 32, to include the login info (username, password) from my new salesforce developer account.

All went well and I saw the following on my screen:

Victor Kane, your session id is
M_ddwGECKJ1DOdbHNEqQwK...... (a lot of session letters and numbers)

I should point out that my development box is Ubuntu 6.06, with Apache 2 and PHP Version 5.1.2 (required, actually, to run this toolkit). Now, the documentation is slanted towards Windows, but so far, so good.

However, when I executed the second demo (which allows you to edit accounts on your development account), above the login form were a series of header errors. ( I got some errors. Rapidly consulting the instructions (, I saw that there was a troubleshooting section, with the reassuring message:

If you run into problems with PHP header redirection in the Account sample, 
make sure that you have output_buffering = 4096 in your php.ini file.

Cool, I rapidly complied with that, and the header warnings went away. However, when I filled in my account username and password and hit enter, there was another error message related to a file that couldn't be opened. What was happening was that the package had an include file (accountsaction.php) required in the welcome.php file with the following line:

require_once ('AccountsAction.php');

Right, our windows boxed friend who had authored these lines hadn't taken into account that more civilized operating systems have a case sensitive file system. So I edited welcome.php to flatten out the CamelCase, and ... presto, I was editing account info in my Salesforce account.

Very cool and very quick.

Now for a First look at the Drupal Sandbox Salesforce code as it was in Steve McKenzie's sandbox in all its pristine glory when I first laid my grubby hands on it.

issue on the implementation of salesforce module

i've installed the salesforce 4.7.x-1.0 module on drupal 4.7.6 and follow the instructions on the install.txt but on the step 3 where says to create a new user im getting an error like this

"Fatal error: Call to a member function query() on a non-object in C:\wamp\www\salesForceTest\modules\salesforce\includes\"

and detect that the lead table on the database have not been created, could you help me??

Sounds like a salesforce login problem

The error message suggests that Salesforce is being queried without a valid logged in salesforce account.

I assume the account and password have already been entered in the administration section?

I must admit I have not tested the module on Windows systems. Will try to do that as soon as possible.

In the meantime, could you post the issue to the Salesforce issue queue to see if someone else has?