Skip to content
Snippets Groups Projects
Commit 8f3fe8ce authored by Aaron Bauman's avatar Aaron Bauman
Browse files

Issue #3506472 by scambler: Record type filter cleared whenever saving mapping fields

parent bd5f92d1
No related branches found
No related tags found
No related merge requests found
Pipeline #451396 canceled
...@@ -182,21 +182,4 @@ abstract class SalesforceMappingFormBase extends EntityForm { ...@@ -182,21 +182,4 @@ abstract class SalesforceMappingFormBase extends EntityForm {
return $sfobject_options; return $sfobject_options;
} }
/**
* {@inheritdoc}
*/
public function buildEntity(array $form, FormStateInterface $form_state) {
$entity = parent::buildEntity($form, $form_state);
$record_types = $form_state->getValue('pull_record_type_filter');
if (!empty($record_types)) {
$record_types = array_filter($record_types);
if (!empty($record_types)) {
$record_types = array_values($record_types);
}
}
$entity->set('pull_record_type_filter', $record_types ?? []);
return $entity;
}
} }
...@@ -605,4 +605,20 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase { ...@@ -605,4 +605,20 @@ abstract class SalesforceMappingFormCrudBase extends SalesforceMappingFormBase {
return $options; return $options;
} }
/**
* {@inheritdoc}
*/
public function buildEntity(array $form, FormStateInterface $form_state) {
$entity = parent::buildEntity($form, $form_state);
$record_types = $form_state->getValue('pull_record_type_filter');
if (!empty($record_types)) {
$record_types = array_filter($record_types);
if (!empty($record_types)) {
$record_types = array_values($record_types);
}
}
$entity->set('pull_record_type_filter', $record_types ?? []);
return $entity;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment