Results 1 to 2 of 2

Thread: invalid column assigned_user_name

  1. #1
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default invalid column assigned_user_name

    Before I submit this as a possible bug has anyone seen this error before? This occurs only when these steps are taken:
    1. Click on a tab (Leads for this example. Most would still cause this error though)
    2. Click on Saved Search & Layout
    3. Click on Search
    4. Check a record for Mass Update
    5. Set Assigned To to some other value and hit Update (bsills in this case)
    6. Receive error. Update finishes but search gets this error message:

    SQL Error : Invalid column name 'assigned_user_name'.: SELECT TOP 51 leads.id , leads_cstm.*, ISNULL(leads.first_name,'') + ' ' + ISNULL(leads.last_name,'') as name, leads.first_name , leads.last_name , leads.salutation , leads.status , leads.account_name , leads.email1 , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, leads.assigned_user_id FROM leads LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c LEFT JOIN users jt0 ON jt0.id= leads.assigned_user_id AND jt0.deleted=0 AND jt0.deleted=0 where (leads.assigned_user_id = 'b5f82355-a0a6-628d-746c-4415a1bb1626' and leads.assigned_user_id like '37a179e0-6aac-48ee-cd64-461a4314f2f9%' and leads.assigned_user_name like 'bsills%') AND leads.deleted=0 ORDER BY name ASC

    I've pinpointed it to include/SearchForm/SearchForm.php in generateSearchWhere(). It passes the assigned_user_name as a db_field and builds a like clause for the user that you assigned the record to up in Step 5. It also only brings back results in the list view for those assigned users with the same user name as in Step 5 so in this case only bsills will be returned. It looks to be an issue with the $_REQUEST/$_POST array being used in two different places for two different reasons which is causing conflicts.

    Any help would be greatly appreciated. This is heavily used here now and this error is causing issues for most of our users.

    Thanks!
    Jason
    Last edited by eggsurplus; 2007-10-12 at 06:20 PM.

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: invalid column assigned_user_name

    I found that if I do this at the end of handleMassUpdate() in include/MassUpdate.php the error goes away:
    PHP Code:
            unset($_REQUEST['assigned_user_name']);
            unset(
    $_REQUEST['assigned_user_id']); 
    It's a hack but it works.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 2007-11-13, 02:51 PM
  2. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  3. Replies: 0
    Last Post: 2006-07-03, 09:54 AM
  4. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 PM

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
  •