function salesforce_api_fieldmap_create in Salesforce Suite 7.2
Same name and namespace in other branches
- 5.2 salesforce_api/salesforce_api.module \salesforce_api_fieldmap_create()
- 6.2 salesforce_api/salesforce_api.admin.inc \salesforce_api_fieldmap_create()
- 7 salesforce_api/salesforce_api.admin.inc \salesforce_api_fieldmap_create()
Creates a new fieldmap in the database and returns the fieldmap object.
Parameters
$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/
salesforce_api.admin.inc - FAPI submit handler for a new fieldmap
File
- salesforce_api/
salesforce_api.admin.inc, line 494 - Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.
Code
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);
unset($values['drupal']);
// Create the fieldmap object.
$map = (object) ($values + array(
'fields' => array(),
));
// Save the new fieldmap.
salesforce_api_fieldmap_save($map);
return $map;
}