Doesn't seem that Campaign_ID can be set through the form. Tried giving a SFDC campaign id as a hidden field, but it doesn't create the lead upon form submission. If this field is removed and submit First name, Last name, Company, and E-mail it works fine.

Using Salesforce Unlimited edition, Drupal 6.16, Salesforce Web Form Data Integration 6.x-1.2.

Comments

obsidiandesign’s picture

Looking through some old code, the Campaign ID field was removed from the default field list. The correct field key is Campaign, not Campaign_ID, even though you are storing the ID.

So, in Site configuration -> Salesforce Webform, enter in the following key pair:
Campaign|Campaign ID

That will allow you to use the pairing on your webform.

Bryan O'Shea
Obsidian Design

obsidiandesign’s picture

Looking through some old code, the Campaign ID field was removed from the default field list. The correct field key is Campaign, not Campaign_ID, even though you are storing the ID.

So, in Site configuration -> Salesforce Webform, enter in the following key pair:
Campaign|Campaign ID

That will allow you to use the pairing on your webform.

Bryan O'Shea
Obsidian Design

koitsenko’s picture

Thanks for the response. I tried the suggested solution but no joy. I also tried commenting out the

'Campaign' => 'Campaign_ID',

in salesforcewebform_fields.inc, and leaving the custom key pair, but no success here either.

Lastly I tried using the custom field support module described in this post:

http://drupal.org/node/760770

When i have this enabled I don't see Campaign as a field key at all.

Were you able to successful test using the custom key/description?

Best regards,

Shawn

obsidiandesign’s picture

Shawn,

What value are you inserting into the Campaign_ID field? I'm wondering if there's a problem just with the value you're trying to submit.

Bryan O'Shea
Obsidian Design

koitsenko’s picture

StatusFileSize
new94.82 KB
new69.61 KB
new75.48 KB
new66.07 KB

I'm putting in the SFDC campaign id, 701A0000000TvvW, which I've grabbed from the salesforce URL. See attached screenshots.

Shawn

koitsenko’s picture

I switched to the DEV version of the module and received the message 'Invalid foreign key relationship name Campaign' error.

I tried switching the mapping from

Campaign|Campaign_ID to CampaignMember|Campaign_ID

which runs without giving errors, but doesn't actually add someone to a campaign. I'm not familiar with the how the relationships work between leads and campaigns so I'm a bit stumped.

Shawn

minhtao’s picture

I have a very similar issue to solve.
I am actually intereted in knowing the answer.

Tao

obsidiandesign’s picture

@koitsenko - I honestly don't know. I'm not a big SF user (I just developed the module for someone who is), so I'm not sure how to debug that error. I would recommend contacting SF support, it may be something simple in the value you're providing to SF.

Bryan O'Shea
Obsidian Design

obsidiandesign’s picture

Assigned: Unassigned » obsidiandesign
Category: bug » support

Changing to a support request, since it's a specific use case.

tvu007007’s picture

Shawn, was this issue ever resolved. You may want to check if the settings for the campaign field in SFDC is set properly. I am curious to what fixed it?

tcampbell’s picture

Any resolution to this? I'm running into the same issue.

obsidiandesign’s picture

Status: Active » Postponed (maintainer needs more info)

Please take a look at: http://boards.developerforce.com/t5/NET-Development/Invalid-foreign-key-....

It seems that assigning a Campaign to a lead through the API is a two-step process: 1) create the lead, then 2) use a CampaignMember object in order to link the lead back to the campaign. That is currently outside the capabilities of this module. I'm not sure yet what changes would be required to implement such a process.

Bryan O'Shea
Obsidian Design

derekwebb1’s picture

Issue summary: View changes

This issue is still occurring as far as I can tell. Anyone find a resolution yet?