AnsweredAssumed Answered

How to fetch case id in from edit view?

Question asked by Hemant Aseri on Jul 8, 2014
Latest reply on Jul 11, 2014 by paperless
 I want to fetch record id in edit view. I am doing email send code on save button click in cases module and i want to fetch data of Account by relate field. I had try to fetch data on basis of record id in edit view but i didn't get any output. I am doing code in custom/modules/cases
and calling file in logic_hooks.php on after save
So please anyone tell me how i will fetch record id in edit view and account data by relate field.

This is my code file:

global $sugar_config;
class Recovered{

    function createRecovered(&$bean, $event, $arguments) {

  if($bean->status=="Closed" && $bean->substatus_c=="Recovered"){


    function sendMail($bean)
       //echo "hi";
    $exdate= explode(" ", $date);
    $session=date("F d,Y", strtotime($datemod));
    $first= explode(" ", $contact);
    $account= $bean-> account_name;
$localhost = $sugar_config['dbconfig']['db_host_name'];
$user = $sugar_config['dbconfig']['db_user_name'];
$password = $sugar_config['dbconfig']['db_password'];
$db_name = $sugar_config['dbconfig']['db_name'];
$conf = mysql_connect($localhost, $user, $password);
$db = mysql_select_db($db_name);

$value = $_REQUEST['id']
$sql= "SELECT * FROM 'cases' where account_id";