Skip to content

Instantly share code, notes, and snippets.

@eggsurplus
Created October 18, 2012 02:22
Show Gist options
  • Select an option

  • Save eggsurplus/3909518 to your computer and use it in GitHub Desktop.

Select an option

Save eggsurplus/3909518 to your computer and use it in GitHub Desktop.
Safely Customizing a Core Bean in SugarCRM - Part 1. SOCustomCase
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
//custom/modules/Cases/SOCustomCase.php
require_once("modules/Cases/Case.php");
class SOCustomCase extends aCase {
function get_list_view_data(){
$temp_array = parent::get_list_view_data(); //let it work as it does by default
//now do our customization
if(empty($temp_array['ASSIGNED_USER_ID']) || $temp_array['ASSIGNED_USER_NAME'] == "portal") {
$temp_array['ASSIGNED_USER_NAME'] = "<a href='index.php?module=Cases&action=GrabCase&record=$this->id'>".SugarThemeRegistry::current()->getImage("uparrow_inline","title='".translate('LBL_GRAB_CASE','Cases')."' border='0'",null,null,'.gif',translate('LBL_GRAB_CASE','Cases'))."</a>";
}
return $temp_array;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment