On this page
- Troubleshooting Connection Errors
- General Suggestions
- In Salesforce:
- In the Salesforce API module settings:
- Using the Devel module:
- In the file salesforce_api.module:
- Checking phpinfo() (linked from admin/reports/status, where the PHP version number is given):
- If you have shell access:
- Troubleshooting Object Creation/Update Errors
Troubleshooting
Last updated on
30 April 2025
Before reporting a bug to the Salesforce issue queue, follow the steps below.
Troubleshooting Connection Errors
General Suggestions
- Are you using the right WSDL? Generate a new one.
- Disable SOAP WSDL cache.
- If you’re switching from sandbox to production, make sure that you switched accounts when generating the WSDL
- Can you connect to the sandbox?
- Are you logging everything? Have you checked watchdog (admin/reports/dblog)?
- Re-enter the token, username and password
- Try to connect using another Salesforce user
In Salesforce:
- Regenerate the WSDL
- If you’re switching from sandbox to production, make sure you're in the right account
- Make sure the IP of your Drupal server is not blocked
- Go to: Your Name > Setup > Users. Check login attempts of the user with which you are connecting to Salesforce from Drupal.
- Reset the credentials associated with the user (password and security token)
In the Salesforce API module settings:
- Replace WSDL file with the one you want to use (admin/settings/salesforce/wsdl)
Using the Devel module:
- Enter the following on the "Execute PHP" page (devel/php):
$somevariable = salesforce_api_connect(); dpm($somevariable);
In the file salesforce_api.module:
- In salesforce_api_login(), find the line
$sf->client->createConnection($wsdl) - Before that line put
dpm($wsdl);(Devel must be enabled) - Make sure that your WSDL file is named "enterprise.wsdl.xml"
Checking phpinfo() (linked from admin/reports/status, where the PHP version number is given):
- Check that SOAP is enabled
- Check that soap.wsdl_cache_enabled is FALSE
- Check that OpenSSL is enabled.
If you have shell access:
- Run
curl https://login.salesforce.comto make sure your machine can connect.
Troubleshooting Object Creation/Update Errors
Many errors on object insert/update/upsert are due to switching from a connection to sandbox Salesforce to live, and vice versa.
If you get an INVALID_CROSS_REFERENCE_KEY error, this means that there is a SFID being referenced in the object that is being pushed which is not valid for a given instance of Salesforce, or a given object type.
Two things to check:
- Ensure that you don't have objects linked (in {salesforce_object_map}) to SFIDs from the live if you are currently connected to the sandbox, or vice versa
- Ensure that you are not referencing Record Type IDs (as fixed values) that are not valid on the instance of Salesforce to which you are currently connected. For example, the sandbox and live will have different Record Type IDs representing the same Record Type Names.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion