You are here

public function RestClient::objectUpdate in Salesforce Suite 8.4

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

Update an existing object.

Parameters

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

string $id: Salesforce id of the object.

array $params: Values of the fields to set for the object.

Return value

null Update() doesn't return any data. Examine HTTP response or Exception.

Overrides RestClientInterface::objectUpdate

1 method overrides RestClient::objectUpdate()
TestRestClient::objectUpdate in src/Tests/TestRestClient.php
Update an existing object.

File

src/Rest/RestClient.php, line 530

Class

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

Namespace

Drupal\salesforce\Rest

Code

public function objectUpdate($name, $id, array $params) {
  $this
    ->apiCall("sobjects/{$name}/{$id}", $params, 'PATCH');
}