You are here

public function RestClient::objectReadbyExternalId in Salesforce Suite 8.3

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

Return a full loaded Salesforce object from External ID.

Parameters

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

string $field: Salesforce external id field name.

string $value: Value of external id.

Return value

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

Overrides RestClientInterface::objectReadbyExternalId

1 call to RestClient::objectReadbyExternalId()
RestClient::objectUpsert in src/Rest/RestClient.php
Create new records or update existing records.

File

src/Rest/RestClient.php, line 787

Class

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

Namespace

Drupal\salesforce\Rest

Code

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