
Originally Posted by
Linnane
In that view.edit.php ... I've only modified the getModuleTitle function.
where do I add the line ... $this->bean->status = $_REQUEST['status']; ?
Did I see something about a display function?
can you give me a sample ? Sorry about this but I think I need a step by step. ?
Also if I go down this road I assume I don't need the hooks (e.g. 'before_save' or 'after_ui_frame')?
Thanks again
Alan
Hi Alan,
your view.edit.php will contain something like this
PHP Code:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.edit.php');
class CustomViewEdit extends ViewEdit{
var $ev;
var $type ='edit';
var $useForSubpanel = false; //boolean variable to determine whether view can be used for subpanel creates
var $useModuleQuickCreateTemplate = false; //boolean variable to determine whether or not SubpanelQuickCreate has a separate display function
var $showTitle = true;
function CustomViewEdit()
{
$this->useForSubpanel = TRUE;
}
function ViewEdit(){
parent::SugarView();
}
function display(){
$this->ev->process();
if($this->ev->isDuplicate) {
foreach($this->ev->fieldDefs as $name=>$defs) {
if(!empty($defs['auto_increment'])) {
$this->ev->fieldDefs[$name]['value'] = '';
}
}
}
/*focus on this line*/
$this->bean->status = $_REQUEST{'status'};
/*focus on this line*/
echo $this->ev->display($this->showTitle);
}
}
?>
try it on your end..it should work properly fine..
Bookmarks