You are here

function hook_default_salesforce_fieldmaps in Salesforce Suite 7.2

Builds a set of default fieldmaps. This allows modules to offer out-of-the box mappings based on common use cases or patterns. It is recommended but not required that you use the following verbose naming convention for your default fieldmaps in order to avoid namespace collisions: mymodule_default_drupalentity_sfentity_field_map The name of your default fieldmap will serve as its primary identifier. If/when your fieldmap is overridden, it will be assigned a standard fieldmap id which will then be used to identify the fieldmap. This is a bastardization of the model CTools uses in order to avoid hard dependency on CTools.

Finally, it is highly recommended that your default fieldmap NOT be automatic. Remember that out-of-the-box module behavior should not change Drupal's current working configuration.

Parameters

string $export - the export schema definition with defaults applied. : (generally unused)

Return value

an array of fieldmap objects according to {salesforce_field_map} schema

See also

sf_entity_default_salesforce_fieldmaps

1 function implements hook_default_salesforce_fieldmaps()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

sf_entity_default_salesforce_fieldmaps in sf_entity/sf_entity.module
Implements hook_default_salesforce_fieldmaps().

File

./salesforce_api.api.php, line 174
These are the hooks that are invoked by the Salesforce core.

Code

function hook_default_salesforce_fieldmaps($export = array()) {
  return array(
    (object) array(
      'disabled' => FALSE,
      'name' => 'salesforce_api_default_user_contact_fieldmap',
      'automatic' => FALSE,
      'drupal_entity' => 'user',
      'drupal_bundle' => 'user',
      'salesforce' => 'Contact',
      'fields' => array(
        'LastName' => 'name',
        'Email' => 'mail',
      ),
      'description' => 'This is a simple example fieldmap to get you started using the Salesforce API.',
    ),
  );
}