Hi,
I would do like to remove the “duplicate” item ViewList to Contracts module.
I tried this:
-
File created in:
custom/modules/AOS_Contracts/views/view.list.php
-
Content:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once 'include/MVC/View/views/view.list.php';
class CustomContractsViewList extends ViewList
{
public function preDisplay()
{
parent::preDisplay();
# Hide Quick Edit Pencil
$this->lv->quickViewLinks = false;
}
}
- Admin / rebuild
But, does not work.
if you want to hide the Duplicate option in Detailview you need to copy this file
to
the metadata folder probably wont be there, just create it
then in the copied file edit this line
array (
'buttons' =>
array (
0 => 'EDIT',
1 => 'DUPLICATE',
2 => 'DELETE',
3 => 'FIND_DUPLICATES',
4 =>
array (
'customCode' => '<input type="button" class="button" onClick="showPopup(\'pdf\');" value="{$MOD.LBL_PRINT_AS_PDF}">',
),
5 =>
array (
'customCode' => '<input type="button" class="button" onClick="showPopup(\'emailpdf\');" value="{$MOD.LBL_EMAIL_PDF}">',
),
),
),
to
array (
'buttons' =>
array (
0 => 'EDIT',
//1 => 'DUPLICATE',
2 => 'DELETE',
3 => 'FIND_DUPLICATES',
4 =>
array (
'customCode' => '<input type="button" class="button" onClick="showPopup(\'pdf\');" value="{$MOD.LBL_PRINT_AS_PDF}">',
),
5 =>
array (
'customCode' => '<input type="button" class="button" onClick="showPopup(\'emailpdf\');" value="{$MOD.LBL_EMAIL_PDF}">',
),
),
),
then quick build & repair
best regards