You are here

public function RestClientInterface::getRecordTypeIdByDeveloperName in Salesforce Suite 8.3

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

Given a DeveloperName and SObject Name, return SFID of the RecordType.

DeveloperName doesn't change between Salesforce environments, so it's safer to rely on compared to SFID.

Parameters

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

string $devname: RecordType DeveloperName, e.g. Donation, Membership, etc.

bool $reset: If true, clear the local cache and fetch record types from API.

Return value

\Drupal\salesforce\SFID The Salesforce ID of the given Record Type, or null.

Throws

\Exception If record type is not found.

1 method overrides RestClientInterface::getRecordTypeIdByDeveloperName()
RestClient::getRecordTypeIdByDeveloperName in src/Rest/RestClient.php
Given a DeveloperName and SObject Name, return SFID of the RecordType.

File

src/Rest/RestClientInterface.php, line 634

Class

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

Namespace

Drupal\salesforce\Rest

Code

public function getRecordTypeIdByDeveloperName($name, $devname, $reset = FALSE);