You are here

function salesforce_api_fieldmap_create in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 5.2 salesforce_api/salesforce_api.module \salesforce_api_fieldmap_create()
  2. 6.2 salesforce_api/ \salesforce_api_fieldmap_create()
  3. 7 salesforce_api/ \salesforce_api_fieldmap_create()

Creates a new fieldmap in the database and returns the fieldmap object.


$drupal: The name of a Drupal object.

$salesforce: The name of a Salesforce object.

Return value

The numeric index of the new fieldmap.

1 call to salesforce_api_fieldmap_create()
salesforce_api_fieldmap_add_form_submit in salesforce_api/
FAPI submit handler for a new fieldmap


salesforce_api/, line 494
Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.


function salesforce_api_fieldmap_create($values) {

  // Break out the Drupal entity and bundle from the selected option.
  list($values['drupal_entity'], $values['drupal_bundle']) = explode(':', $values['drupal'], 2);

  // Create the fieldmap object.
  $map = (object) ($values + array(
    'fields' => array(),

  // Save the new fieldmap.
  return $map;