コード例 #1
0
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
require_once 'modules/ComponentEstimate/ComponentEstimate.php';
require_once 'modules/ProductComponents/ProductComponents.php';
require_once 'include/formbase.php';
global $app_list_strings;
$sugarbean = new ComponentEstimate();
$sugarbean = populateFromPost('', $sugarbean);
$sugarbean->status = "uptodate";
if (isset($_REQUEST['email_id'])) {
    $sugarbean->email_id = $_REQUEST['email_id'];
}
if (!$sugarbean->ACLAccess('Save')) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
$sugarbean->save($GLOBALS['check_notify']);
$component = new ProductComponents();
$component->retrieve($sugarbean->component_id);
//// Status Update
if (isset($_REQUEST['stat_action']) && !empty($_REQUEST['stat_action']) && !is_null($_REQUEST['stat_action'])) {
    $component->status_update('', $component->id, $_REQUEST['stat_action'], '');
} else {
    $component->status_update('', $component->id, '', '');
}
/////////////////
$return_id = $sugarbean->id;
handleRedirect($return_id, 'ComponentEstimate');