From 523432c7a4a91b0e7149cc2f9cc1f677514dce9d Mon Sep 17 00:00:00 2001 From: samuelsov Date: Wed, 18 Mar 2015 16:28:29 -0400 Subject: [PATCH] CRM-16137 add support to custom fields from is_multiple custom groups --- CRM/Core/BAO/Mapping.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 7857c4bfd5..bd8f7abe7e 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -319,7 +319,12 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { $contactType = array('Individual', 'Household', 'Organization'); foreach ($contactType as $value) { - $contactFields = CRM_Contact_BAO_Contact::exportableFields($value, FALSE, $required); + if ($mappingType == 'Search Builder') { + // get multiple custom group fields in this context + $contactFields = CRM_Contact_BAO_Contact::exportableFields($value, FALSE, $required, FALSE, TRUE); + } else { + $contactFields = CRM_Contact_BAO_Contact::exportableFields($value, FALSE, $required); + } $contactFields = array_merge($contactFields, CRM_Contact_BAO_Query_Hook::singleton()->getFields()); // exclude the address options disabled in the Address Settings -- 2.25.1