Get in touch:
01524 851 877
07718 896 553

Remove Quick Create From All Modules In Sugarcrm

Posted on Jan 14 2010

If you need to remove the Quick Create view from every module as I recently needed to it is quite simple to do. First of all create the following file:

custom/include/MVC/View/views/view.sidequickcreate.php
Then all you need to do is copy the following code in:

class ViewSidequickcreate extends SugarView
{
function display()
{
return '';
}
}

Go to the admin section and perform a “Quick Repair and Rebuild” and Quick Create should have disappeared from every module.

SugarCRM – Remove Mass Update From A Built In Module

Posted on Jan 02 2010

This quick post will show you how to remove the mass update field from a built in module in SugarCRM. 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 Opportunities 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/Opportunities/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 OpportunitiesViewList 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 OpportunitiesViewList to ViewList and place it in the appropriate directory.

SugarCRM Field Access Control

Posted on Oct 27 2009

I have been playing around with SugarCRM CE recently as part of a project and one of the features we required was to be able to make some fields read only to certain users. This feature is available in the Professional version of SugarCRM but unfortunately not in the Community Edition.

Fortunately I came across this SugarCRM module which did some of what I wanted. Unfortunately however, when a field is set to “Read Only” it disappears totally in the Edit View. Apparently this is a feature of the module but it definitely wasn’t what I wanted. I wanted the fields to still appear in the Edit View but be read only.

There were also a few other bits and pieces unfinished in the module such as the type of access that had been selected for a field showing up as the representing integer value in the overview rather than a human readable string.

After quite a steep learning curve editing the templates and adding a logic hook I have managed to get the module doing more or less what I want. I have left the original type of Read Only as it was and added a new type “Read Only In Edit View” which does pretty much what it says on the tin. I have also changed the overview list of fields to display a string showing what type of access has been selected for a field.

I am probably going to keep making tweaks to this module as there are still quite a few tweaks that could be made to make it a bit better I think.

For now my modified version of the module can be downloaded here or here.