Tuesday, 26 February 2013

Hide Select and Cancel buttons from Relate type fields


To Do: Hide select and cancel buttons from relate type field.


Step 1: To make it happen, you first need to check if you have a file editviewdefs.php under custom/modules/<Desired_module>/metadata/ if not, go to Admin > Studio > <Desired_module> > Layout > Edit View > and press Save and Deploy.

Then you will see that  custom/modules/<Desired_module>/metadata/ has editviewdefs.php in it. Open it and search for the field you want to hide those buttons.

If the field is defined in following manner,


Then you need to change it to,

0 => array('name' => '<YOUR_FIELD_NAME>',
'displayParams' => array('hide_Buttons' => true,)),

If your field is already an array like,

0 =>
          array (
            'name' => '<YOUR_FIELD_NAME>',
            'studio' => 'visible',
            'label' => '<LBL_YOUR_FIELD_NAME>',

 just add following line in that array

'displayParams' => array('hide_Buttons' => true,)

So it should look like following at the end

0 =>
          array (
            'name' => '<YOUR_FIELD_NAME>',
            'studio' => 'visible',
            'label' => '<LBL_YOUR_FIELD_NAME>',
            'displayParams' => array('hideButtons' => true),

Step 2: Go to Admin > Repair > Quick Repair and Rebuild. And done!

Feel free to leave comments below.

No comments:

Post a Comment

Urdhva Tech Pvt. Ltd. Powered by Blogger.

Urdhva Tech

My photo
SugarCRM Consultants Contact us at contact@urdhva-tech.com Skype : urdhvatech

Search This Blog

Stay connected Socially


Total Pageviews

Popular Posts