Results 1 to 3 of 3

Thread: I've accidentally deleted Accounts > Contacts subpanel Name field in studio

  1. #1
    andrewrux is offline Member
    Join Date
    Sep 2004
    Posts
    7

    Default I've accidentally deleted Accounts > Contacts subpanel Name field in studio

    While working in Studio > Field Layout for the Accounts | Contacts subpanel, I accidentally removed the Name field while editing the layout. I can't seem to find where this Name field exists, I can see First Name and Last Name but not a single Name field in the list of SugarCRM fields in the left sidepanel.

    So now when I review the Accounts page, I get the following SQL Error:

    Error retrieving Account list: Query Failed: SELECT contacts.id , contacts_cstm.*, contacts.first_name , contacts.last_name , ' ' account_name , ' ' account_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 accounts_contacts ON (contacts.id=accounts_contacts.contact_id AND accounts_contacts.account_id='4b6d0dc9-d4a3-19ff-6597-44b3e7b1adc1') where ( accounts_contacts.deleted=0 AND contacts.deleted=0) AND contacts.deleted=0 ORDER BY name asc LIMIT 0,25::MySQL error 1054: Unknown column 'name' in 'order clause'

    Can one get the Name field back through the Studio or do I have ask my network admin to hack the PHP code to fix this?

    The layout for this is the same as in the Cases | Contacts subpanel, can someone tell me which file he can copy the layout code from there to put it back in the Accounts | Contacts subpanel?

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Talking Re: I've accidentally deleted Accounts > Contacts subpanel Name field in studio

    OK, Here is what you can do.

    Go to Custom/Modules/Accounts/Ext/Layoutdefs/ and you will see a file called layoutdefs.ext.php. Open that and comment out the line like this

    Change:

    $layout_defs['Accounts']['subpanel_setup']['contacts']['override_subpanel_name'] = 'AccountForAccounts';

    into:
    //$layout_defs['Accounts']['subpanel_setup']['contacts']['override_subpanel_name'] = 'AccountForAccounts';

    Then do the same thing for the file called custom/Extensions/modules/Accounts/ext/Layoutdefs/AccountContactsForAccounts.php. Just comment out the one line in that file.

    then you subpanel should return to normal. If it does then you should be able to just reedit your layout being more careful this time.

    Let me know.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    andrewrux is offline Member
    Join Date
    Sep 2004
    Posts
    7

    Default Re: I've accidentally deleted Accounts > Contacts subpanel Name field in studio

    Thank you Mr. Brill. This helped my IT guy fix quickly over the weekend.

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
  •