Conditionally hide subpanel in SugarCRM

June 12, 2011

Let your module name is “company”, table name is “company” and subpanel is ["Company"]["subpanel_setup"]["sales"];

Create a new file “custom.php” at in/custom/Extension/modules/Company/Ext/Layoutdefs/

Write/follow below code as you need:

<?php

global $bean,$db; $id = $_GET["record"];

$query_cstm=”SELECT * FROM company WHERE id=’$id’”;
$result_cstm=$db–>query($query_cstm,true);
$row_cstm=$db->fetchByAssoc($result_cstm);
$city= $row_cstm["city"];

if($city != ‘dhaka’){
unset($layout_defs["Company"]["subpanel_setup"]["sales"]);
}

?>

And then just repair Extension from admin.


install centos 5.5 in vm

June 11, 2011

Download netinstaller from http://www.chrisgountanis.com/technical/45-centos-netinstall.html you can use it with vmWare player or VirtualBox.

At the time of giving images info use:
vault.centos.org as server name and 5.5/os/i386 as directory path.


Follow

Get every new post delivered to your Inbox.