Skip to content

Instantly share code, notes, and snippets.

@eggsurplus
Created March 3, 2014 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggsurplus/9327455 to your computer and use it in GitHub Desktop.
Save eggsurplus/9327455 to your computer and use it in GitHub Desktop.
Disable convert lead
<?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