You are here

function salesforce_api_id_unlink in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 6.2 salesforce_api/salesforce_api.module \salesforce_api_id_unlink()
3 calls to salesforce_api_id_unlink()
sf_entity_export in sf_entity/sf_entity.module
Exports an entity to Salesforce using the specified fieldmap and stores the ID of the Salesforce object for the entity.
sf_entity_salesforce_form in sf_entity/sf_entity.module
Displays the Salesforce synchronization form.
sf_entity_salesforce_form_submit in sf_entity/sf_entity.module
Form submit handler for the [entity-name]/%/salesforce form.


salesforce_api/salesforce_api.module, line 1430
Defines an API that enables modules to interact with the Salesforce server.


function salesforce_api_id_unlink($args) {
  $valid_args = !empty($args['sfid']) || !empty($args['oid']) && (!empty($args['drupal_entity']) || !empty($args['name']));
  if (!$valid_args) {
    return FALSE;
  $num_deleted = db_delete('salesforce_object_map');
  if (!empty($args['oid'])) {
      ->condition('oid', $args['oid']);
  if (!empty($args['sfid'])) {
      ->condition('sfid', $args['sfid']);
  if (!empty($args['drupal_entity'])) {
      ->condition('drupal_entity', $args['drupal_entity']);
  if (!empty($args['name'])) {
      ->condition('name', $args['name']);
  module_invoke_all('salesforce_api_post_unlink', $args);