How to make 'Role' sortable for Opps<->Contacts subpanel?
On the Contacts subpanel in the Opportunity DetailView, how can I make 'Role' column sortable.
I've already changed the modules\Contacts\subpanels\ForOpportunities.php file as below:
Was false, changed to true. This allows me to now click on the 'Role' column to sort BUTCode:'opportunity_role'=>array( 'name'=>'opportunity_role', 'vname' => 'LBL_LIST_CONTACT_ROLE', 'width' => '10%', 'sortable'=>true, ),
I get a SQL error:
The alias for the role value 'opportunity_role' is not added to the query... Where can I change this?Error retrieving Opportunity list: Query Failed: SELECT contacts.id , contacts_cstm.*, contacts.first_name , contacts.last_name , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) as name, ' ' account_name , ' ' account_id , ' ' opportunity_role_fields , ' ' opportunity_id , contacts.email1 , contacts.phone_work , contacts.assigned_user_id , 'contacts' panel_name FROM contacts LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c INNER JOIN opportunities_contacts ON (contacts.id=opportunities_contacts.contact_id AND opportunities_contacts.opportunity_id='9b3ba724-585b-a1e2-a290-4477638525d6') where ( opportunities_contacts.deleted=0 AND contacts.deleted=0) AND contacts.deleted=0 ORDER BY opportunity_role asc LIMIT 0,20::MySQL error 1054: Unknown column 'opportunity_role' in 'order clause'
Thanks,
Rey


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks