Saturday, May 7, 2016

SugarCRM CE | SuiteCRM-Add any field to Mass Update

If its a custom field that you added through studio then simply go into your sugar database and then the fields_meta_data table and find the row entry for your custom field.
Change the massupdate field from 0 to 1.

If its not a custom field added through studio then create a custom php file in this location:

/custom/Extention/modules//Ext/Vardefs/any_name.php

and then add the following code for your specific field.

$dictionary['']['fields']['']['massupdate'] = 1;
Finally run a repair/rebuild and your field should be available on mass update panel.

SugarCRM and Suitecrm – Remove Mass Update From A Built In Module

This quick post will show you how to remove the mass update field from a built in module in SugarCRM or Suitecrm. This will also work for a module that has been deployed but it will not work properly for a module built using module builder. Well, it will work but as soon as you re-deploy the module the changes will be over-written.

For the purpose of this we will use the Account module and assume that it is this that we wish to remove the Mass Update panel from.

The first thing to do is create the file ‘view.list.php’ in /custom/modules/Account/views/ – If this path does not exist, simply create it and place the file in there.

Once that is done add the following code to the file.

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('include/MVC/View/views/view.list.php');

class AccountViewList extends ViewList
{
function listViewProcess()
{
$this->lv->showMassupdateFields = false;
parent::listViewProcess();
}
}
This will remove the Mass update panel from the module. To adapt the above code for other modules simply change the name of the class from AccountViewList to ViewList and place it in the appropriate directory.