Hi,
I want to know how we can remove the Delete button from the custom module in listview.
Thanks,
Sunil
Hi,
I want to know how we can remove the Delete button from the custom module in listview.
Thanks,
Sunil
You'd have to cut some code ... you cannot do this using Studio.
If you're worried about users deleting records, two things:
1. you can limit their ability to do this by applying roles (Admin>Roles)
2. sugar does not delete records from the database ... just sets a flag to 1=deleted ... so you can always undelete
Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 MySQL 5.0.32
SalesAgility.com - SugarCRM Experts (UK)
Authors of Advanced OpenSales - Open Source Quotations, Invoices, Products and Contracts modules for SugarCRM Community Edition - Download here
Hi Sunil
You need to do the following:
Create a view.list.php containing this function:
CheersPHP Code:function preDisplay() {
$this->lv = new ListViewSmarty();
$this->lv->delete = false;
}
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.
Thank you very much....
you can change in include/listview/listviewsmarty.php
var $delete = true; in false
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.
I want to disable the the delete button in opportunity module.
only owner and admin are allowed to delete.if some opportunity is assigned to other then other user will not able to delete the opportunity
Please help me out
You can also hide delete button in list view by overriding the functions in ListViewSmarty class.
This is a 100% upgrade safe approach.
Create a file in custom/<MODULE_NAME>/<MODULE_NAME>ListViewSmarty.php
<?php
require_once('include/ListView/ListViewSmarty.php')
class <MODULE_NAME>ListViewSmarty extends ListViewSmarty{
function <MODULE_NAME>ListViewSmarty(){
parent::ListViewSmarty();
}
function buidDeleteLink(){
return ' ';
}
}
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks