Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created March 9, 2011 19:28
Show Gist options
  • Save jmertic/862797 to your computer and use it in GitHub Desktop.
Save jmertic/862797 to your computer and use it in GitHub Desktop.
<?php
if (!defined('sugarEntry'))
define('sugarEntry', true);
require_once 'include/MVC/Controller/SugarController.php';
class AccountsController extends SugarController {
function action_detailview() {
// Require extended custom bean class with function added
require_once 'custom/modules/Accounts/AccountsDetailView.php';
//Instanciate new object of this extended class
$this->bean = new AccountsDetailView();
// Retrieve record into the object
$this->bean->retrieve($this->record);
// Set view as 'detail'
$this->view = 'detail';
$GLOBALS['view'] = $this->view;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment