diff --git a/application/Espo/Modules/Crm/Resources/i18n/en_US/Contact.json b/application/Espo/Modules/Crm/Resources/i18n/en_US/Contact.json index c997fb799a..c85c3df114 100644 --- a/application/Espo/Modules/Crm/Resources/i18n/en_US/Contact.json +++ b/application/Espo/Modules/Crm/Resources/i18n/en_US/Contact.json @@ -48,6 +48,7 @@ }, "presetFilters": { "portalUsers": "Portal Users", - "notPortalUsers": "Not Portal Users" + "notPortalUsers": "Not Portal Users", + "accountActive": "Active" } } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json index b8913e0f47..a72b852b69 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json @@ -48,6 +48,7 @@ }, "relationshipPanels": { "contacts": { + "filterList": ["all", "accountActive"], "layout":"listForAccount" }, "opportunities":{ diff --git a/application/Espo/Modules/Crm/SelectManagers/Contact.php b/application/Espo/Modules/Crm/SelectManagers/Contact.php index 542d7fdf6e..0093156c00 100644 --- a/application/Espo/Modules/Crm/SelectManagers/Contact.php +++ b/application/Espo/Modules/Crm/SelectManagers/Contact.php @@ -61,5 +61,13 @@ class Contact extends \Espo\Core\SelectManagers\Base } } + protected function filterAccountActive(&$result) + { + if (!array_key_exists('additionalColumnsConditions', $result)) { + $result['additionalColumnsConditions'] = array(); + } + $result['additionalColumnsConditions']['isInactive'] = false; + } + }