Custom Objects
itdcole - August 3, 2009 - 07:14
| Project: | Salesforce Webform Lead Form Integration |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
This looks great! But I need to extend it to a custom object of mine. How would I begin to do this?

#1
#2
*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):
$sObject = new sObject();$sObject->type = 'Lead'; // Salesforce Table or object that you will perform the upsert on
$sObject->fields = $all_fields;
array_push($sObjects, $sObject);
And change "Lead" to the qualified API Name.
ex. "custom_object_name__c"
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
How 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.).