Results 1 to 2 of 2

Thread: How to make 'Role' sortable for Opps<->Contacts subpanel?

  1. #1
    elRey is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    80

    Question How to make 'Role' sortable for Opps<->Contacts subpanel?

    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:
    Code:
    		'opportunity_role'=>array(
    			'name'=>'opportunity_role',		
    			'vname' => 'LBL_LIST_CONTACT_ROLE',
    			'width' => '10%',
    			'sortable'=>true,
    		),
    Was false, changed to true. This allows me to now click on the 'Role' column to sort BUT
    I get a SQL error:

    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'
    The alias for the role value 'opportunity_role' is not added to the query... Where can I change this?

    Thanks,
    Rey

  2. #2
    elRey is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    80

    Default Re: How to make 'Role' sortable for Opps<->Contacts subpanel?

    anyone?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •