You are here

public function SalesforceMapping::alwaysUpsert in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::alwaysUpsert()
  2. 5.0.x modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::alwaysUpsert()

Return TRUE if this mapping should always use upsert over create or update.

Return value

bool Whether to upsert, ignoring any local Salesforce ID.

Overrides SalesforceMappingInterface::alwaysUpsert

File

modules/salesforce_mapping/src/Entity/SalesforceMapping.php, line 696

Class

SalesforceMapping
Defines a Salesforce Mapping configuration entity class.

Namespace

Drupal\salesforce_mapping\Entity

Code

public function alwaysUpsert() {
  return $this
    ->hasKey() && !empty($this->always_upsert);
}