0

We installed Webforms and Salesforce suites and we'd like to create new leads in Salesforce based on the webform submissions.

I created a webform with 3 fields.

email:
  '#type': email
  '#title': Email
company:
  '#type': textfield
  '#title': company
last_name:
  '#type': textfield
  '#title': 'last name'

Then I created a mapping with Salesforce linked to webform submissions. In the mapped fields, I think I have to use tokens. So I have the following

[webform_submission:original:values:email] --> linked to Salesforce email field
[webform_submission:original:values:company] --> linked to Salesforce Company field
[webform_submission:original:values:last_name]--> linked to Salesforce Last Name field

When I test my form, I get an error message that says "Drupal push failed".

Any suggestions? Thanks.

10
  • You left an important part, D7 or D8?
    – No Sssweat
    Commented Jan 28, 2019 at 14:13
  • @NoSssweat Indeed, sorry.... We're using D8. Commented Jan 29, 2019 at 7:18
  • Are there any other related errors in /admin/reports/dblog ?
    – No Sssweat
    Commented Jan 29, 2019 at 7:49
  • yes, there's 1 error Commented Jan 29, 2019 at 13:32
  • yes, there's 1 error (too long to display in 1 answer) Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'salesforce_id' cannot be null: INSERT INTO {salesforce_mapped_object} (revision_id, drupal_entity__target_id, drupal_entity__target_type, salesforce_mapping, salesforce_id, created, changed, entity_updated, last_sync_status, last_sync_action, force_pull) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, Commented Jan 29, 2019 at 13:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.