Results 1 to 5 of 5

Thread: Removing buttons from Activities Sub Panel

  1. #1
    Steve435 is offline Member
    Join Date
    May 2009
    Posts
    5

    Default Removing buttons from Activities Sub Panel

    In the Accounts module there is a sub panel for Activities and I want to remove the "Create Task" and "Schedule Meeting" buttons but can't figure it out. Any ideas?

    Thanks in advance.

  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,335

    Default Re: Removing buttons from Activities Sub Panel

    You need to create an extended Layoutdefs for Accounts:
    custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php

    Add a code to unset the buttons for the subpanel activities.

    PHP Code:
    <?PHP
    $buttons_to_remove 
    = array('SubPanelTopCreateTaskButton''SubPanelTopScheduleMeetingButton');

    foreach(
    $layout_defs['Accounts']['subpanel_setup']['activities']['top_buttons'] as $id => $button_def) {
      if(
    in_array($button_def['widget_class'], $buttons_to_remove)) {
        unset(
    $layout_defs['Accounts']['subpanel_setup']['activities']['top_buttons'][$id]);
      }
    }
    ?>
    Go to Admin -> Repair -> Rebuild Extensions

    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.

  3. #3
    aroyzen is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    15

    Default Re: Removing buttons from Activities Sub Panel

    Hello Andopes,

    I followed your advise and it worked only before I did repair. After repair of extensions the code despaired . Maybe you know of another good place to put it so it will stay.

    Thanks a lot for your very helpful post

  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: Removing buttons from Activities Sub Panel

    Quote Originally Posted by aroyzen View Post
    Hello Andopes,

    I followed your advise and it worked only before I did repair. After repair of extensions the code despaired . Maybe you know of another good place to put it so it will stay.

    Thanks a lot for your very helpful post
    I believe you saved the code into custom/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php instead of custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php.
    Figure it out and let us know.

    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
    aroyzen is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    15

    Default Re: Removing buttons from Activities Sub Panel

    Thanks a lot for your help, you are exactly right.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Removing Export buttons
    By dogfuel in forum Developer Help
    Replies: 1
    Last Post: 2008-06-06, 06:29 AM
  2. Removing Activities Tab at the Top
    By rps1984 in forum Help
    Replies: 12
    Last Post: 2008-04-10, 10:24 AM
  3. Removing buttons
    By Jimbobway in forum Developer Help
    Replies: 3
    Last Post: 2008-01-11, 08:15 PM
  4. Removing Fields from Mass Update Panel
    By mkatzhyman in forum Help
    Replies: 0
    Last Post: 2007-02-23, 03:16 PM
  5. Accounts - Activities Sub-Panel Customization
    By smueller72 in forum Help
    Replies: 0
    Last Post: 2006-02-02, 11:39 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
  •