PHP, SugarCRM, Javascript, Cool Web Apps Developer

Blog

Customize Subpanel Buttons.

Posted by swapnil shinde on February 5, 2012 at 7:05 AM

To customize subpanel buttons.

Suppose we need to hide Create and Select buttons, or if we need to navigate quick create to full form. Then we need to follow following steps.

We need to first see the Subpanel's name.(which you can find out from studio/module/Relationships).

Navigate to custom/Extension/modules/Parent_Module/Ext/Layoutdefs

create one file like custombyswapnil.php.

and code like this.

<?php

$layout_defs["parent_module"]["subpanel_setup"]["subpanel_name"]['top_buttons']= array (

    0 =>

    array (

      'widget_class' => 'SubPanelTopCreateButton',

    ),

   

 // 1 =>

    // array (

      // 'widget_class' => 'SubPanelTopSelectButton',

      // 'mode' => 'MultiSelect',

    // ),

  );

 

?>

Above code is for hiding select button and making create button to navigate to full form directly.

Now, if you need to apply default sort order for the subpanel records according to any  field or to add title as you want, you can find file named custombyswapnil.php in "Downloads" section. if file doesn't open in firefox use chrome.


Categories: Feb2012-SugarCRM Help

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

You must be a member to comment on this page. Sign In or Register

0 Comments