function hook_salesforce_api_pre_export in Salesforce Suite 6.2
Same name and namespace in other branches
- 7.2 salesforce_api.api.php \hook_salesforce_api_pre_export()
Called immediately before a Salesforce object is to be created or updated during export (e.g. sf_user_export, sf_node_export). Entity-based modules that invoke Salesforce create, update, or upsert methods should always invoke this hook before calling Salesforce. This feature was primarily designed for queue/batch support, but could have other use cases as well.
This hook is invoked after a prematching attempt. For modules that may care about such a situation, when $sf_object->sfid is empty, this is a Salesforce "create" operation. Otherwise, this is a Salesforce "update" operation.
Parameters
object $sf_object: The object about to be exported to Salesforce
mixed $name: The fieldmap name used to create sf_object
string $drupal_id : The unique id of the drupal object associated with the sf_object, e.g. nid
array $map: The fieldmap array provided by salesforce_api_fieldmap_load().
Return value
Implementing modules should return FALSE if the current export should NOT proceed. Note that this will prevent further processing of implementations of this hook.
1 function implements hook_salesforce_api_pre_export()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- sf_queue_salesforce_api_pre_export in sf_queue/
sf_queue.module - Implements hook_salesforce_api_pre_export
2 invocations of hook_salesforce_api_pre_export()
- sf_node_export in sf_node/
sf_node.module - Exports a node to Salesforce using the specified fieldmap and stores the ID of the Salesforce object for the node.
- sf_user_export in sf_user/
sf_user.module - Exports a user to Salesforce using the specified fieldmap and stores the ID of the Salesforce object for the user.
File
- ./
hooks.php, line 224 - These are the hooks that are invoked by the Salesforce core.
Code
function hook_salesforce_api_pre_export(&$sf_object, $map, $drupal_id) {
}