public function TestRestClient::objectCreate in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/Tests/TestRestClient.php \Drupal\salesforce\Tests\TestRestClient::objectCreate()
- 5.0.x src/Tests/TestRestClient.php \Drupal\salesforce\Tests\TestRestClient::objectCreate()
Create a new object of the given type.
Parameters
string $name: Object type name, E.g., Contact, Account, etc.
array $params: Values of the fields to set for the object.
Return value
\Drupal\salesforce\SFID The new object's SFID.
Overrides RestClient::objectCreate
File
- src/
Tests/ TestRestClient.php, line 129
Class
- TestRestClient
- Test Salesforce REST client.
Namespace
Drupal\salesforce\TestsCode
public function objectCreate($name, array $params) {
$random = new Random();
return new SFID(strtoupper($random
->string(SFID::MAX_LENGTH)));
}