Posted by somanyfish on March 19, 2011 at 5:45pm
3 followers
Jump to:
| Project: | Salesforce Webform Data Integration |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello,
I am using SalesForce 6.x-2.x-dev, Webform 6.x-3.9 and Drupal 6.20. My Salesforce account has a Custom Lead Field with label WebformSID and API Name WebformSID__c. It's set as Unique, Case Insensitive and an External ID. In my SalesForce Webform settings, ie have this in the Custom Fields textarea:
WebformSID__c|WebformSIDOn my webform, the last field on my form is a hidden field with Name SID Key, with Field Key webformsid__c and the mapping for "SalesForce Field Key" is set to WebformSID. The page generates this HTML:
<input type="hidden" name="submitted[webformsid__c]" id="edit-submitted-webformsid--c" value="" />When I fill out and submit my webform, I get this error:
INVALID_FIELD: Field name provided, WebformSID__c does not match an External ID for LeadI've poured over the install directions and can't see where I'm going wrong. Any ideas?
Thanks so much!
Comments
#1
You shouldn't need anything in the Custom Fields text area, with his version of the module.
This might be the problem, it might be trying to post that field twice.
Another thing you can try is add a field for the Lead Record Type.
1. On the webform add a field called Record Type (hidden, default value of your Custom Record Type Name)
2. In the Saleforce Key Field, pick the Lead Record Type
This might allow it to work by specifying your custom record type.
Since you are using a Custom Lead Record Type, it might be trying to submit into the Lead record and not your Custom Lead. You can verify this by adding the WebformSID__c to the default Lead record in salesforce. If it starts working then this is the case.
When you create the hidden field on the webform, did WebformSID show up in the drop-down for the Salesforce Key Field?
Since the error message says the External ID can't be found, I would double check WebformSID field in salesforce and make sure it saved the External ID setting.
#2
@btlife, thanks so much for taking at stab at this. I tried your first suggestion, but when I remove "WebformSID__c|WebformSID" from the Custom Fields textarea, then "Webform SID Key" was not available as a choice for the "Webform SID Key" mapping. Thinking there was maybe also a problem with my custom field on Salesforce, I deleted the existing one and recreated it. Then, I could see the field as a choice in the mapping in my webform. The form submits now, thank you very much!
#3
Actually looking through the API docs some more, looks like it would have to be an ID you send in for the record type.
so
Another thing you can try is add a field for the Lead Record Type.
1. On the webform add a field called RecordTypeId (hidden, set default value to your Customer Record Type Id)
2. In the Saleforce Key Field, pick the RecordTypeId
I think you can pull the RecordTypeId from the Url while you are editing it in Salesforce. My url looks like :
https://na9.salesforce.com/setup/ui/recordtypefields.jsp?id=012E0000000H...
so the id would be 012E0000000Hi9D and you would put this in the default value for the webform field
#4
Good to hear you got it working!!
#5
Per #2, marking this closed/fixed.
Bryan O'Shea