How to fetch related field id through logic hook

I am trying to fetch related field id(related field is Account) through the logic from the call module using these code

require_once('modules/Accounts/Account.php');

  $userbean = new Account();

  $userbean->retrieve($bean->account_id);

  $userphone   = $userbean->phone_office;

  //$usermobile  = $userbean->phone_work;

  echo "<pre>";

  print_r($bean->account_id);

  echo $userbean;

But it is not working please tell me how to do this in sugarCE 6.5.22.