{"action":"opened","issue":{"url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/156","labels_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/156/comments","events_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/156/events","html_url":"https://github.com/salesagility/SuiteCRM/issues/156","id":60430467,"number":156,"title":"Standard SugarCRM search now looks for invalid 'email' column ","user":{"login":"klou","id":1377378,"avatar_url":"https://avatars.githubusercontent.com/u/1377378?v=3","gravatar_id":"","url":"https://api.github.com/users/klou","html_url":"https://github.com/klou","followers_url":"https://api.github.com/users/klou/followers","following_url":"https://api.github.com/users/klou/following{/other_user}","gists_url":"https://api.github.com/users/klou/gists{/gist_id}","starred_url":"https://api.github.com/users/klou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klou/subscriptions","organizations_url":"https://api.github.com/users/klou/orgs","repos_url":"https://api.github.com/users/klou/repos","events_url":"https://api.github.com/users/klou/events{/privacy}","received_events_url":"https://api.github.com/users/klou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-10T00:01:07Z","updated_at":"2015-03-10T00:01:07Z","closed_at":null,"body":"7.2 only, seems to work fine on 7.1.5\r\n\r\nChanging from AOD to standard SugarCRM search produces the following error:\r\n```\r\nSQL Error : Invalid column name 'email'.SQL Error : Invalid column name 'email'.SQL Error : Invalid column name 'email'.\r\n```\r\n\r\nRelevant query in sugarcrm.log\r\n\r\n```\r\nQuery Failed: SELECT TOP 11 * FROM\r\n                                (\r\n                                     SELECT  accounts.id ,accounts_cstm.tml_account_id_c, accounts.name , accounts.billing_address_city , accounts.billing_address_country , accounts.phone_office  , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner  , N'Users' assigned_user_name_mod, accounts.date_entered , accounts.assigned_user_id  , ROW_NUMBER()\r\n                                    OVER (ORDER BY accounts.date_entered DESC) AS row_number\r\n                                    FROM accounts  LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c   LEFT JOIN  users jt0 ON accounts.assigned_user_id=jt0.id AND jt0.deleted=0\r\n\r\n AND jt0.deleted=0 where (((accounts.name like N'10625%' ) OR ( accounts.phone_office like N'10625%' ) OR ( email IN (select bean_id  from (SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE N'10625%') email_derived) ) OR ( accounts_cstm.tml_account_id_c like N'10625%'))) AND accounts.deleted=0\r\n                                ) AS a\r\n                                WHERE row_number > 0: SQL Server error: Invalid column name 'email'.\r\n```\r\n\r\n... where the search query is '10625'.\r\n\r\nI do have a custom accounts table (as seen by the existence of accounts_cstm.tml_account_id_c), but I see similar errors with regards to the contacts and leads modules as well (the only ones I have active for Global Search)."}}