AnsweredAssumed Answered

SugarCrm add a column to leads list page.

Question asked by Ashutosh Sharma on Nov 20, 2019

I've to add a column in leads list view page.

I've tried this...

 

custom/Extension/modules/Leads/Ext/LogicHooks/specQuickEditButton.php

<?php
$hook_array['process_record'][] = Array(1, 'Add Quick Edit Button in ListView', 'custom/SpecCustom/LogicHooks/modules/Leads/specQuickEditButton.php', 'specQuickEditButton', 'addButton');

 

 

custom/SpecCustom/LogicHooks/modules/Leads/specQuickEditButton.php

 

<?php
 if(!defined('sugarEntry'))define('sugarEntry', true);
class specQuickEditButton {
    
    
    function addButton($bean, $event, $args) {
        global $mod_strings;
        $bean->spec_quick_edit_button = "<button type='button' id='{$bean->id}={$bean->full_name}={$bean->lead_country_c}=".get_assigned_user_name($bean->assigned_user_id)."' patient_name='{$bean->full_name}' patient_country='{$bean->lead_country_c}' class='btn-addtask' value='\"".$mod_strings['LBL_SPEC_QUICK_EDIT_BUTTON']."\"'> ".$mod_strings['LBL_SPEC_QUICK_EDIT_BUTTON']." </button><input type='hidden' name='assigned_lead_data' value='{$bean->assigned_user_id}=".get_assigned_user_name($bean->assigned_user_id)."'";
    }

 

Then Quick repaired and rebuild.

 

But the Quick Edit button is not showing in leads list view.

 

Any Suggestion ??

 

Outcomes