if (!empty($value)) {
$value[$fieldName] = $importedValue;
}
+ if ($relatedContactKey && !isset($params[$relatedContactKey])) {
+ $params[$relatedContactKey] = ['contact_type' => $this->getRelatedContactType($mappedField['relationship_type_id'], $mappedField['relationship_direction'])];
+ }
if (!$relatedContactKey) {
if (!empty($value)) {
if (!isset($params[$fieldName])) {
}
else {
- if (!isset($params[$relatedContactKey])) {
- $params[$relatedContactKey] = ['contact_type' => $this->getRelatedContactType($mappedField['relationship_type_id'], $mappedField['relationship_direction'])];
- }
-
if (!empty($value)) {
$params[$relatedContactKey][$fieldName][] = $importedValue ? [] : $value;
}