This looks great! But I need to extend it to a custom object of mine. How would I begin to do this?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | salesforcewebform.538468v9.patch | 17.62 KB | obsidiandesign |
| #9 | salesforcewebform.538468v2.patch | 8.5 KB | obsidiandesign |
| #5 | salesforcewebform.538468.patch | 7.87 KB | obsidiandesign |
Comments
Comment #1
itdcole commentedComment #2
itdcole commented*Needs better documentation*
The path for the soapclient needs to be the full path.
ex. "/var/www/html/{website folder}/modules/salesforcewebform/includes"
Not. "/{website folder}/modules/salesforcewebform/includes
To change it to a custom object find the code that says (around Line 277 in salesforcewebform.module):
And change "Lead" to the qualified API Name.
ex. "custom_object_name__c"
Comment #4
amariotti commentedHow hard would it be to add this as a field in the webform to determine which object type the push went to? You mentioned in your "ex." that you could add "custom_object_name__c" to replace 'Lead' in the code. Would that fix this? It would be awesome if this feature could be added so that each webform could potentially push to different object types (i.e. Contacts, etc.).
Comment #5
obsidiandesign commentedFirst test at including the ability to link to Accounts, Contacts, or Leads through the same form. Please make sure to run update.php if you try the patch, as the object type is stored into the database. THIS IS NOT PRODUCTION READY, so only use on test/demo systems. I would like some eyes on the patch & interface to see if it will meet peoples needs.
There are also some minor documentation & code style changes I noticed & an attempt to catch error messages & set them through drupal_set_message. The bulk of the patch, however, is the changes for custom objects.
Bryan O'Shea
Obsidian Design
Comment #6
amariotti commentedJust to keep from killing our live site I tested this on another Drupal install on the same server and I am getting the following error:
One thing that we're a little nervous about is that we have a Private Data model on our SF instance. We also have Person Accounts enabled... if none of that makes sense then maybe we need to talk. I'm hoping that those things don't cause any problems, but it's possible. What we may need to do is re-activate your account on our SF Instance so you can do your tests there. Not sure what else to do here. We really need to get this done asap. Get in touch with me if this is going to be more time that we can compensate you for.
Thanks,
Andrew
Comment #7
amariotti commentedHere's some API documentation about Person Accounts: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_guide...
Also might be helpful for Person Account stuff: http://community.salesforce.com/sforce/board/message?board.id=apex&messa...
Comment #8
amariotti commentedI have re activated your account on our instance. Let me know if you have any problems getting in. Contact me directly.
Comment #9
obsidiandesign commentedVersion 2 of the patch for testing; accounts, contacts, and leads work. Better handling of errors using drupal_set_message for better debugging.
Comment #10
obsidiandesign commentedAlso, for anyone else testing - please note the important change in INSTALL.txt - when adding the code to the additional processing box, there are now three arguments to the function.
Comment #11
amariotti commentedJust an update. The above patch adds the ability to push to Accounts, Contacts and Leads using this module. We've tested the above patch and things seem to be working properly now with the ability to debug. Last step is to organize the fields in the field mapping dropdown to make it easier to map your fields and know what's required when you're using different object types. Update coming soon!
Comment #12
obsidiandesign commentedAfter a series of patch changes and tests, I'm happy to be able to share a version 9 of the patch referenced in #9. It handles Accounts, Leads, Contacts, and Account+Contact combinations. Some documentation needs to be updated, but the functionality is there. Anyone that can test and review would be a huge help in pushing this forward.
Comment #13
obsidiandesign commentedCommitted to 6.x-dev.