function hook_salesforce_api_id_save_alter in Salesforce Suite 7.2
Same name and namespace in other branches
- 6.2 hooks.php \hook_salesforce_api_id_save_alter()
Modify Salesforce IDs before they are saved to the {salesforce_object_map} table.
Parameters
$oid: The associated unique ID used to identify the object in Drupal.
$sfid: The Salesforce ID of the associated object in the Salesforce database.
$name: The name of the fieldmap used to generate the export.
$op_type: The operation being performed, 'import' or 'export'.
$entity_name: The type of Drupal entity being saved.
$bundle_name: The Drupal bundle type being saved.
Return value
TRUE if salesforce_api_id_save() should proceed with saving the link, FALSE otherwise.
1 invocation of hook_salesforce_api_id_save_alter()
- salesforce_api_id_save in salesforce_api/
salesforce_api.module - Saves the Salesforce ID and fieldmap index of a Drupal object. Also stores the timestamp of creation for the object mapping, and when the object was last exported to Salesforce or imported to Drupal.
File
- ./
salesforce_api.api.php, line 208 - These are the hooks that are invoked by the Salesforce core.
Code
function hook_salesforce_api_id_save_alter(&$oid, &$sfid, &$name, &$entity_name, &$bundle_name, &$op_type) {
// Example: Do not allow a mapping to be saved between UID 1 and Salesforce
if ($oid == 1 && $entity_name == 'user') {
return FALSE;
}
}