You are here

function salesforce_api_describeSObject in Salesforce Suite 7

Same name and namespace in other branches
  1. 6.2 salesforce_api/salesforce_api.module \salesforce_api_describeSObject()
  2. 7.2 salesforce_api/salesforce_api.module \salesforce_api_describeSObject()

Wrapper for SOAP SforceBaseClient::describeSObject Given an sf object type, return the SF Object definition

Parameters

string type : the machine-readable name of the SF object type.:

2 calls to salesforce_api_describeSObject()
salesforce_api_admin_object_settings in salesforce_api/salesforce_api.admin.inc
Placeholder for per-object configuration settings. Any ideas?
salesforce_api_drush_describe in salesforce_api/salesforce_api.drush.inc
Examine a salesforce table. Allows for deep inspection using dot syntax similar to sql databases.

File

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

Code

function salesforce_api_describeSObject($type) {
  if (!is_string($type)) {
    drupal_set_message(t('DescribeSObject expects a string. @type recieved.', array(
      '@type' => gettype($type),
    )), 'error');
    return FALSE;
  }
  $objects = salesforce_api_describeSObjects($type);
  if (!empty($objects[$type])) {
    return $objects[$type];
  }
  else {
    drupal_set_message(t('DescribeSObject failed to find @type.', array(
      '@type' => $type,
    )), 'error');
    return FALSE;
  }
}