Index: sf_prematch/sf_prematch.main.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/salesforce/sf_prematch/Attic/sf_prematch.main.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 sf_prematch.main.inc
--- sf_prematch/sf_prematch.main.inc	1 Mar 2010 14:38:28 -0000	1.1.2.3
+++ sf_prematch/sf_prematch.main.inc	19 Mar 2010 16:53:40 -0000
@@ -22,6 +22,7 @@ function sf_prematch_export($object_type
   // Get information to allow using handlers to get values of Drupal fields.
   $drupal_object_info = salesforce_api_fieldmap_objects_load('drupal', $map['drupal']);
   $drupal_fields_info = $drupal_object_info['fields'];
+  $sf_object_info = salesforce_api_fieldmap_objects_load('salesforce', $map['salesforce']);
 
   $values = array();
   $select_clause = "SELECT id";
@@ -34,8 +35,10 @@ function sf_prematch_export($object_type
     $values[$match_by_field] = array();
     // If a handler is specified for retrieving a value for the source field...
     if (isset($drupal_fields_info[$drupal_field_name]['export'])) {
+      $drupal_field_definition = $drupal_fields_info[$drupal_field_name];
+      $sf_field_definition = $sf_object_info['fields'][$drupal_to_salesforce_fieldmap[$drupal_field_name]];
       // Get the value for the field from the handler function.
-      $drupal_value = $drupal_fields_info[$drupal_field_name]['export']($drupal_object, $drupal_field_name);
+      $drupal_value = $drupal_fields_info[$drupal_field_name]['export']($drupal_object, $drupal_field_name, $drupal_field_definition, $sf_field_definition);
     }
     // Otherwise set the field on the export object to the value of the source
     // field if it's present on the source object.
