Missing Required Fields?
| Project: | Salesforce |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Hi folks,
Hopefully someone who has more experience with this module can give me some clues on this error.
Here's my set up...
D5.7
Enabled contact and profile. Installed salesforce
Updated the partner.wsdl and applied the salesforce.php patch as recommended here.
Have the correct security code for my password and I've added my server IP to SF dev account.
When I attempt to add a user from the admin panel (with the add to sf checkbox) I get the following error:
* an error occured [lead_insert] during a salesforce lead task for the user <a href="/user/8" title="View user profile.">test6</a> with the messasge - "Required fields are missing: [LastName, Company]"
* warning: preg_match() expects parameter 2 to be string, object given in /httpdocs/includes/bootstrap.inc on line 670.Not sure the warning is an issue but I put it there anyway...
When I try to run the example.php in the includes dir, it appears all the tests are working except the add lead. it gives the following response/error...
[accountId] =>
[contactId] =>
[errors] => Array
(
[fields] =>
[message] => invalid convertedStatus: Qualified
[statusCode] => INVALID_STATUS
)
[leadId] => 00Q4000000GrogQEAR
[opportunityId] =>
[success] => falseI've also attached the entire dump from the example.php if that helps...
Any thoughts pointers would be greatly appreciated. I'd love to avoid a 12 hour debug if I have one little thing off :(
Thanks,
Mike
| Attachment | Size |
|---|---|
| response.txt | 8.18 KB |

#1
Hi Mike,
Have you tried downloading the salesforce module itself and following the instructions in the README file?
Since salesforce is a phenomenon that inspires many use cases, many people have contributed patches for various purposes, and many are great patches in certain contexts if you take everything a step at a time; but my recommendation would be first of all to get everything working normally with the module as released here, and see if that is working, and then take it from there.
Please let me know.
Victor
#2
Hi Victor,
Sorry if it wasn't clear in my first post -- I did install the SF module.
I've done some more testing and it appears the first error above is a bug that exists when you create a user via the admin interface and check the "create lead" checkbox. Leads aren't generated. However, leads are being added (in my case) when a new user registers and when user submits a contact us form.
The second error from the example.php file is a non fatal error that seems to have something to do with the "status" of the lead in sf. example.php appears to work fine.
I think I got things going well enough for my needs... thanks!
Mike
#3
Changing ticket title. sorry.
#4
Well, kudos to mpaler for being the only person sharp enough to tell me the Emperor is wearing no clothes.
Apparently, there have been a bunch of people using this module and not reporting this terrible bug, which was introduced with a recent update of the repository.
The bug is that salesforce being further down the alphabetical totem pole than profile, when a user registers (in my case) or when the admin creates a new user, the profile module implementation of hook_user correctly NULL's out the $edit hash, and with the change I made I joyfully call lead_insert with those NULLs.
A patch is attached (put the code back to the way it always was for 'insert' op of user_hook implementation). However, just download dev snapshot (which I think will be 5.x stable in a few days, after review) in about 24 hours.
#5
I am having the same problem. Thank you for posting this patch.
I am a newbie to all of this and I need a little direction on how to apply the patch.
I do not know how do it.
could I please have a step by step instruction of how to apply this patch to my salesforce module
thank you
#6
Let me know if this doesn't help...
http://drupal.org/node/60108
#7
Thank you for the note above. I have implemented the patch, however I am still getting errors.
I am able to create a new user, and it does post to salesforce now and I can see the new user in salesforce and I see the new user in logs. Which is great!
Things I am unable to do
see leads under the leads tab,
see contacts under the contacts tabs
in the salesforce module.
this is the error I receive when I enter in a new user. (although the new user does post back to salesforce now)
* an error occured [lead_insert] during a salesforce lead task for the user User User with the messasge - ""
* recoverable fatal error: Object of class stdClass could not be converted to string in /home/p571r884/public_html/includes/bootstrap.inc on line 676.
* warning: preg_match() expects parameter 2 to be string, object given in /home/p571r884/public_html/includes/bootstrap.inc on line 679.
* an error occured [lead_insert] during a salesforce lead task for the user User User with the messasge - ""
I am really at a loss, I have read as much as I can find on line and gone through and implemented as many patches as I can find.
If anyone has any insight to this nature of what might be happening I would love to hear from you.
Janalese
#8
This is wrong, the patch is entirely unnecessary, because the 5.x dev download already has it applied.
That is not the problem here.
If user is using latest (April) dev snapshot, patch would neither be necessary nor possible to apply.
Please use latest.
#9
I have never seen the errors mentioned in #7.
Profile fields complete?
On the leads that got posted to salesforce, any fields missing?
#10
Thank you for your response:
All the fields are filled in Salesforce. Name, phone fax, email and company.
I am stumped at this point.
I would be happy to provide you with access to the site that I am working on if you would like to take a look. It is all just temp development stuff and nothing that is of great importance at this point.
I do want to implement this module in a site that does matter but I am simply seeing if it will work for me at this point.
Janalese