public function SelectQueryResult::record in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::record()
- 5.0.x src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::record()
Fetch a particular record given its SFID.
Parameters
\Drupal\salesforce\SFID $id: The SFID.
Return value
\Drupal\salesforce\SObject The record.
Throws
\Exception If the given SFID doesn't exist in these results.
File
- src/
SelectQueryResult.php, line 103
Class
- SelectQueryResult
- Class SelectQueryResult.
Namespace
Drupal\salesforceCode
public function record(SFID $id) {
if (!isset($this->records[(string) $id])) {
throw new \Exception('No record found');
}
return $this->records[(string) $id];
}