When "more than one "automatic" salesforce mapping" is detected, the error message returned (using the latest CVS code not dev) lists the map name, in my case "salesforce_api_default_user_contact_field_map". Because that internal name does not appear on the SalesForce fieldmap list page (/admin/settings/salesforce/fieldmap), it is unclear what map is actually being referred to.

I would like to suggest we also include the map description which is on the list page.

Patch to follow.

Comments

dpearcefl’s picture

StatusFileSize
new1.98 KB

This patch enhances sf_user.module and sf_node.module.

kostajh’s picture

Status: Active » Needs work
+++ sf_node/sf_node.module	24 Feb 2011 17:25:26 -0000
@@ -111,7 +111,7 @@ function sf_node_nodeapi(&$node, $op, $a
+          drupal_set_message(t('Warning: more than one "automatic" salesforce mapping detected. Used fieldmap @map_name (@map_description).', array('@map_name' => $map->name, '@map_description' => $map->description)), 'warning');

Not all fieldmaps have descriptions. How about doing something like this instead:

drupal_set_message(t('Warning: more than one "automatic" salesforce mapping detected. Used fieldmap @map_name @map_description.', array('@map_name' => $map->name, '@map_description' => '(' . $map->description . ')')), 'warning');

That way the end-user doesn't see a potentially confusing set of empty parentheses if no description is set.

Powered by Dreditor.

aaronbauman’s picture

Can we solve this by linking the fieldmap name to the fieldmap edit form?

dpearcefl’s picture

Fieldmap names can be really ugly. Example: b6d3f0616ee367fb19a78b92f286c82a

So I'd rather NOT show them in the edit form. Linking to the form might be OK.

aaronbauman’s picture

sorry, i meant putting a link to the edit form in the message.
e.g.

drupal_set_message(t('Warning: more than one "automatic" salesforce mapping detected. Used fieldmap !map_name @map_description.', array('!map_name' => l($map->name, SALESFORCE_PATH_FIELDMAPS . '/' . $map->name . '/edit'), '@map_description' => '(' . $map->description . ')')), 'warning');
kostajh’s picture

Status: Needs work » Needs review

I think that looks great.

dpearcefl’s picture

What is going on with this issue? Is a final patch needed? (Just trying to keep the train moving.)

dpearcefl’s picture

Looks like this may be there in git. Can someone else confirm?

kostajh’s picture

Status: Needs review » Needs work

This was not committed, we need a patch that incorporates changes from #5.

dpearcefl’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

I'm not in a position right now to test this patch file nor the actual code in the change. Can anyone else handle this?

dpearcefl’s picture

Bump.

dpearcefl’s picture

StatusFileSize
new1.97 KB

This works for me.

kostajh’s picture

Status: Needs review » Fixed

This is committed, thank you! I made an adjustment to show the description only if it's set.

http://drupalcode.org/project/salesforce.git/commit/4281693

Status: Fixed » Closed (fixed)

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

nicodv’s picture

I know is late for this discussion, but now that i'm getting this error "Warning: more than one "automatic" salesforce mapping detected. Used fieldmap" it means I'm mapping two objects in sf to one in drupal? I'm trying to map Accounts and Opportunities in SF to Users in drupal.

This is not doable?

thank you very much