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

Thread: Help with showing all Notes in new Subpanel

  1. #1
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Help with showing all Notes in new Subpanel

    Hi, I've just started playing with SugarCRM and I have the following issue. I need a subpanel in Accounts displaying all notes from Accounts, Opportunities, Leads and Cases. Now, I've had no problem creating a new subpanel showing the notes related to the Account, but I'm a bit lost as to where I add the notes for Opportunities, Leads and Cases to the same list. Is there a SQL statement that I can change?

    Thanks for any help!

  2. #2
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Re: Help with showing all Notes in new Subpanel

    I hope, the question isn't too complicated or too stupid.

    I am running 5.1, if that helps..

  3. #3
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Re: Help with showing all Notes in new Subpanel

    *bump*

    Would it help, if I posted this in a different section?

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

    Default Re: Help with showing all Notes in new Subpanel

    Quote Originally Posted by Nicci View Post
    Hi, I've just started playing with SugarCRM and I have the following issue. I need a subpanel in Accounts displaying all notes from Accounts, Opportunities, Leads and Cases. Now, I've had no problem creating a new subpanel showing the notes related to the Account, but I'm a bit lost as to where I add the notes for Opportunities, Leads and Cases to the same list. Is there a SQL statement that I can change?

    Thanks for any help!
    Hi Nicci

    You need to configure your Notes subpanel to get data from a function, inside this function you need to generate a sql query which returns all notes related to the Account, their Opportunities, Contacts and Cases.
    Have a look at the modules/Campaigns/metadata/layoutdefs.php to understand how to implement.

    Cheers
    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.

  5. #5
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Re: Help with showing all Notes in new Subpanel

    Thank you so much for your answer. I went and checked, however, I do not have that layoutdefs.php file in the Campaigns module. I checked the Sugar version again and it seems, it's running 5.2 and not 5.1 in case this changes anything. I'm hesitating to upgrade to the latest alpha version - any idea where I can get that file to look at?

    Thanks!

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

    Default Re: Help with showing all Notes in new Subpanel

    The file is modules/Campaigns/metadata/subpaneldefs.php
    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.

  7. #7
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Re: Help with showing all Notes in new Subpanel

    Got you - many thanks!

  8. #8
    jertothejig is offline Member
    Join Date
    Feb 2009
    Location
    Los Angeles
    Posts
    9

    Default Re: Help with showing all Notes in new Subpanel

    Quote Originally Posted by Nicci View Post
    Hi, I've just started playing with SugarCRM and I have the following issue. I need a subpanel in Accounts displaying all notes from Accounts, Opportunities, Leads and Cases. Now, I've had no problem creating a new subpanel showing the notes related to the Account, but I'm a bit lost as to where I add the notes for Opportunities, Leads and Cases to the same list. Is there a SQL statement that I can change?

    Thanks for any help!
    I appreciate all of the help on this forum. I noticed you were able to get notes to display in the sub panel. How did you do that?

  9. #9
    Nicci is offline Member
    Join Date
    Feb 2009
    Posts
    6

    Default Re: Help with showing all Notes in new Subpanel

    Yes, I finally got it. I added a new subpanel to the Accounts:

    'notes' => array(
    'order' => 40,
    'module' => 'Notes',
    'subpanel_name' => 'ForAccounts',
    'sort_order' => 'desc',
    'sort_by' => 'date_modified',
    'get_subpanel_data' => 'function:get_all_notes',
    'add_subpanel_data' => 'note_id',
    'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopButtonQuickCreate'),
    array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
    ),
    ),

    added the fields (subject, status, parent_type, etc..) and added the function get_all_notes to Account.php which creates the SQL statement to get the notes from Accounts, Opportunities, Leads and Cases.

    May not be the most proper way but works like a charm. Thank you, Andopes, again for the tip!

    ETA: If you only want to show the Notes from Accounts, this will suffice:

    'notes' => array(
    'order' => 40,
    'module' => 'Notes',
    'subpanel_name' => 'ForAccounts',
    'sort_order' => 'desc',
    'sort_by' => 'date_modified',
    'get_subpanel_data' => 'notes',
    'add_subpanel_data' => 'note_id',
    'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopButtonQuickCreate'),
    array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
    ),
    ),

  10. #10
    balajivfp is offline Junior Member
    Join Date
    Jun 2010
    Posts
    2

    Default Re: Help with showing all Notes in new Subpanel

    Hi,

    I am working on getting all the notes for a particular account. Can you please provide the complete information of what needs to be done.

    Thanks

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. Subpanel not showing up
    By salimmohd82 in forum Developer Help
    Replies: 6
    Last Post: 2008-04-16, 06:04 PM
  2. Subpanel not showing
    By ratheeshid in forum Developer Help
    Replies: 1
    Last Post: 2008-04-16, 07:06 AM
  3. Notes Subpanel
    By baba_2002 in forum Developer Help
    Replies: 0
    Last Post: 2006-09-28, 01:57 PM
  4. Adding subpanel to notes
    By y2chuck in forum General Discussion
    Replies: 0
    Last Post: 2006-08-24, 05:55 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
  •