CRM Open Source Business & Social CRM Software

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: History Subpannel Layout ! Help Please

  1. #1
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Exclamation History Subpannel Layout ! Help Please

    Hi All,

    Under the Accounts module in the history sub panel, I need to change the date modified to date created.

    can someone please help me on this it would be greatly appreciated.

    There is a screenshot attached to show exactly what I meen.

    Thanks

    jmaskell
    Attached Images Attached Images  

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,261

    Default Re: History Subpannel Layout ! Help Please

    Hi jmaskell

    You need to rename date_modified by date_created into modules/<ModuleName>/metadata/subpanels/forHistory.php for the modules Calls, Emails, Meetings, Notes, Tasks.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Default Re: History Subpannel Layout ! Help Please

    Hi andopes

    Thanks for the reply.

    But can you please go into more detail as i am new to sugar.

    Also I want to rename the field i want to replace it.

    Thanks in advance

    jmaskell

  4. #4
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Default Re: History Subpannel Layout ! Help Please

    Also I done want to rename the field, i want to replace it. " was what i ment to put

    Cheers Jake

  5. #5
    eddiechen is offline Sugar Community Member
    Join Date
    Jun 2008
    Posts
    462

    Default Re: History Subpannel Layout ! Help Please

    If I achive the email, I want to add "data sent"

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

    Default Re: History Subpannel Layout ! Help Please

    You have to edit these files

    modules/Calls/metadata/subpanels/ForHistory.php
    modules/Meetings/metadata/subpanels/ForHistory.php
    modules/Tasks/metadata/subpanels/ForHistory.php
    modules/Notes/metadata/subpanels/ForHistory.php

    and look for the date_modified section. Then either replace it with the code for the date_entered or add date_entered as shown below.
    PHP Code:
      'date_modified'=>array(
      
    'vname' => 'LBL_LIST_DATE_MODIFIED',
        
    'width' => '10%',
    ),
      
    'date_entered'=>array(
         
    'vname' => 'LBL_DATE_ENTERED',
         
    'width' => '10%',
    ), 
    then edit

    modules/Emails/metadata/subpanels/ForHistory.php
    modules/Emails/metadata/subpanels/ForUnlinkedEmailHistory.php


    and look for the date_modified section. Then either replace it with the code for the date_entered or add date_entered as shown below.
    PHP Code:
    'date_modified' => array(
         
    'width'                    => '10%',
    ),
    'date_entered' => array(
         
    'width'                    => '10%',
    ), 
    Now you could also rework the percentages if you wanted to,but I'll leave that to you.
    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

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

    Default Re: History Subpannel Layout ! Help Please

    Quote Originally Posted by eddiechen
    If I achive the email, I want to add "data sent"
    This isnt possible at the moment as none of the other modules in history have a date_sent field and the history subpanel requires all the field span across all the modules.

    You might have to be happy with date created (date_entered).
    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

  8. #8
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Default Re: History Subpannel Layout ! Help Please

    Hi

    Thanks for the help

    I followed the Steps exactly and get this error.

    Error retrieving Account list: Query Failed SELECT meetings.id , meetings.name , meetings.status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , meetings.date_entered , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , meetings.assigned_user_id , 'meetings' panel_name FROM meetings LEFT JOIN users jt1 ON jt1.id= meetings.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( meetings.parent_id= 'b0ec7356-1da7-6c20-9c2e-492529712bee' AND meetings.parent_type='Accounts' AND meetings.deleted=0 AND (meetings.status='Held' OR meetings.status='Not Held')) AND meetings.deleted=0 ) UNION ALL ( SELECT tasks.id , tasks.name , tasks.status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name , tasks.contact_id , contacts.assigned_user_id contact_name_owner , 'Contacts' contact_name_mod, tasks.date_entered , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , tasks.assigned_user_id , 'tasks' panel_name FROM tasks LEFT JOIN contacts contacts ON contacts.id= tasks.contact_id AND contacts.deleted=0 AND contacts.deleted=0 LEFT JOIN users jt1 ON jt1.id= tasks.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( tasks.parent_id= 'b0ec7356-1da7-6c20-9c2e-492529712bee' AND tasks.parent_type='Accounts' AND tasks.deleted=0 AND (tasks.status='Completed' OR tasks.status='Deferred')) AND tasks.deleted=0 ) UNION ALL ( SELECT calls.id , calls.name , calls.status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , calls.date_entered , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , calls.assigned_user_id , 'calls' panel_name FROM calls LEFT JOIN users jt1 ON jt1.id= calls.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( calls.parent_id= 'b0ec7356-1da7-6c20-9c2e-492529712bee' AND calls.parent_type='Accounts' AND calls.deleted=0 AND (calls.status='Held' OR calls.status='Not Held')) AND calls.deleted=0 ) UNION ALL ( SELECT notes.id , notes.name , ' ' status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name , notes.contact_id , contacts.assigned_user_id contact_name_owner , 'Contacts' contact_name_mod, notes.date_entered , ' ' assigned_user_name , ' ' assigned_user_owner , ' ' assigned_user_mod , notes.filename , notes.created_by , 'notes' panel_name FROM notes LEFT JOIN contacts contacts ON contacts.id= notes.contact_id AND contacts.deleted=0 AND contacts.deleted=0 where ( notes.parent_id= 'b0ec7356-1da7-6c20-9c2e-492529712bee' AND notes.parent_type='Accounts' AND notes.deleted=0) AND notes.deleted=0 ) UNION ALL ( SELECT emails.id , emails.name , emails.status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , emails.date_entered , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , emails.assigned_user_id , 'emails' panel_name FROM emails LEFT JOIN users jt0 ON jt0.id= emails.assigned_user_id AND jt0.deleted=0 AND jt0.deleted=0 INNER JOIN emails_beans ON (emails.id=emails_beans.email_id AND emails_beans.bean_id= 'b0ec7356-1da7-6c20-9c2e-492529712bee' AND bean_module='Accounts') where ( emails_beans.deleted=0 AND emails.deleted=0) AND emails.deleted=0 ) UNION ALL ( SELECT emails.id , emails.name , emails.status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , emails.date_entered , jt0.user_name assigned_user_name , jt0.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , emails.assigned_user_id , 'linkedemails' panel_name FROM emails LEFT JOIN users jt0 ON jt0.id= emails.assigned_user_id AND jt0.deleted=0 AND jt0.deleted=0 JOIN (select distinct email_id from emails_email_addr_rel eear join email_addr_bean_rel eabr on eabr.bean_id ='b0ec7356-1da7-6c20-9c2e-492529712bee' and eabr.bean_module = 'Accounts' and eabr.email_address_id = eear.email_address_id and eabr.deleted=0 where eear.deleted=0 and eear.email_id not in (select eb.email_id from emails_beans eb where eb.bean_module ='Accounts' and eb.bean_id = 'b0ec7356-1da7-6c20-9c2e-492529712bee' and eb.deleted=0) ) derivedemails on derivedemails.email_id = emails.id where emails.deleted=0 ) ORDER BY date_modified desc LIMIT 0,10::MySQL error 1054: Unknown column 'date_modified' in 'order clause'

    Under an account were the sub panels should been.

    Help please !

    Thanks


    jmaskell
    Attached Images Attached Images  
    Last edited by jmaskell; 2008-11-21 at 01:16 PM.

  9. #9
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,261

    Default Re: History Subpannel Layout ! Help Please

    Hi jmaskell

    You also need to create an extended layoutdefs for Accounts (custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php) changing the date_modified to date_entered into

    PHP Code:
    $layoutdefs['Accounts'][subpanel_setup]['history']['sort_by'
    Then you need to go to Admin -> Repair -> Rebuild Extension

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

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

    Default Re: History Subpannel Layout ! Help Please

    Thats becuase you replaced date_modified. Now you have to edit each subpaneldefs.php again and change the sort_by directive. Change it from date_modified to date_entered

    PHP Code:
             'history' => array(
                 
    'order' => 20,
                 
    'sort_order' => 'desc',
                 
    'sort_by' => 'date_modified',
                 
    'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
                 
    'type' => 'collection'
    subpaneldefs.php is in the metadata directory of every module that has a history, like account, contacts and leads.

    I would follow the advice below about the extended file, but do for all modules with a history subpanel.
    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

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2008-05-13, 10:29 AM
  2. Changing the layout of the Cases subpannel
    By Tavares in forum Developer Help
    Replies: 2
    Last Post: 2007-06-12, 12:39 PM
  3. Replies: 4
    Last Post: 2006-12-27, 06:26 PM
  4. Edit History Layout
    By rsantiago in forum Help
    Replies: 0
    Last Post: 2006-09-27, 03:46 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
  •