Using CiviCRM 4.6.4, I am trying to update the activity report to include the custom fields from the contact form. By using the following code they show up in the list but does not allow sorting on the custom fields.

protected $_customGroupExtends = array(
  'Activity', 'Contact', 'Organization');
protected $_nonDisplayFields = array();
public function __construct() {

 $this->_autoIncludeIndexedFieldsAsOrderBys = 1;

Here is the error DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'value_client_project_definition_3_civireport.corridor..."

If you open the activity report then go to sorting and select one of the displayed custom fields that is added by adding the following code to the report. $this->_autoIncludeIndexedFieldsAsOrderBys = 1;

The DB error is generated.

Thanks in advance

  • 1
    This question feels unclear to me. Can you edit your question to give more context about what exactly you changed? Maybe show a diff with the original? Also what version of CiviCRM is this? – Coleman Jul 21 '15 at 18:59
  • this is version 4.6.4 The code added was 'Contact', 'Organization' and $this->_autoIncludeIndexedFieldsAsOrderBys = 1; – user2201570 Jul 30 '15 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.