Created
March 3, 2014 15:34
-
-
Save eggsurplus/9327455 to your computer and use it in GitHub Desktop.
Disable convert lead
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//custom/modules/Leads/views/view.detail.php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
require_once('include/MVC/View/views/view.detail.php'); | |
class CustomLeadsViewDetail extends ViewDetail | |
{ | |
function display() | |
{ | |
global $sugar_config; | |
//If the convert lead action has been disabled for already converted leads, disable the action link. | |
$disableConvert = ($this->bean->status == 'Converted' && !empty($sugar_config['disable_convert_lead'])) ? TRUE : FALSE; | |
$disableConvert = true; //wrap additional logic around this | |
$this->ss->assign("DISABLE_CONVERT_ACTION", $disableConvert); | |
parent::display(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment