I installed webform2sugar on drupal 7 with webform 3. When I add form components to the form, the "Map field to SugarCRM" select box did not show up. I added some debug print statements and it looks like the the webform2sugar_form_webform_component_edit_form_alter function uses the nid, and the database query was not returning the table row with the campaign id I had entered in the SugarCRM settings tab. When I manually changed the webform2sugar table database entry to match the nid of my form, the "Map field to SugarCRM" dropdown shows up and everything works fine. Except that when I now go to the SugarCRM settings, it does not show a campaign id because that uses the vid.

So it looks like some of the code is using the nid and some using the vid.

Comments

rurri’s picture

Assigned: Unassigned » rurri

Great catch nebrenner.

Yeah as it looks now, it IS using the vid sometimes and the nid sometimes. Surprised this has not come out sooner. I believe there is a good chance that the issue fixes itself if you do not use revisions on the webform. Will investigate a bit more to see if this is going to be an easy fix.

Rurri

rurri’s picture

Status: Active » Fixed

So turns out this was just completely wrong for the 7.x version. Thanks for finding this and flushing it out.

A fix was just checked into the 7.x-4.x branch. Currently available in dev.

@nebrenner Any chance you can confirm this fix before I create a new beta?

nebrenner’s picture

Looks like it is working for me. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.