Hi,
I'm on Sugar version 5.2k Pro. How can one add a new custom button to the listview of Accounts.
Rgds
Chris
Hi,
I'm on Sugar version 5.2k Pro. How can one add a new custom button to the listview of Accounts.
Rgds
Chris
Last edited by agcopley; 2010-02-24 at 09:52 PM. Reason: Error
You need to do the following:
create a custom view.list.php for Accounts;
implement the method preDisplay() containing something like that:
create the script custom/modules/Accounts/ListViewAccounts.php containing the class ListViewAccounts which extends ListViewSmarty.PHP Code:function preDisplay(){
require_once('custom/modules/Accounts/ListViewAccounts.php');
$this->lv = new ListViewAccounts();
}
implement inside this class the method buldExportLink containing something like that:
RegardsPHP Code:function buildExportLink($id = 'export_link') {
$script = parent::buildExportLink($id);
$script.= // the code for custom button
return $script;
}
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.
Hi André
Thanks for that - what exactly is the $script ment to be. Is it javascript to create a button, is it php code?
Rgds
Chris
It is a php script.
Take a look into function buildExportLink at include/ListView/ListViewDisplay.php
Cheers
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks