You are here

public function RestClient::objectRead in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::objectRead()
  2. 5.0.x src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::objectRead()

Return a fullly loaded Salesforce object.

Parameters

string $name: Object type name, E.g., Contact, Account.

string $id: Salesforce id of the object.

Return value

\Drupal\salesforce\SObject Object of the requested Salesforce object.

Overrides RestClientInterface::objectRead

File

src/Rest/RestClient.php, line 780

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce\Rest

Code

public function objectRead($name, $id) {
  return new SObject($this
    ->apiCall("sobjects/{$name}/{$id}"));
}