This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
/** | |
* Add a default SecurityGroup for any newly created user | |
*/ | |
class AddSecurityGroup | |
{ | |
function add_default_group($bean, $event, $arguments) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//......... | |
protected function constuctQuery() | |
{ | |
$query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total, ". | |
"count(*) as opp_count FROM opportunities "; | |
$query .= " WHERE opportunities.deleted=0 "; | |
if ( count($this->lsbo_ids) > 0 ) | |
$query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->lsbo_ids)."') "; | |
if ( count($this->lsbo_lead_sources) > 0 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$viewdefs['base']['layout']['header'] = array( | |
'components' => | |
array( | |
array( | |
'layout' => 'module-list', | |
), | |
array( | |
'view' => 'globalsearch', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('clients/base/views/profileactions/profileactions.php'); | |
$viewdefs['base']['view']['wiki-profileactions'] = $viewdefs['base']['view']['profileactions']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
extendsFrom: 'ProfileactionsView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
}, | |
setCurrentUserData: function() { | |
app.view.invokeParent(this, {type: 'view', name: 'profileactions', method: 'setCurrentUserData'}); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//check for existing installed modules | |
$mycompany_admin_options_defs = array(); | |
if(!empty($admin_group_header['MyCompany'])) | |
{ | |
$mycompany_admin_options_defs = $admin_group_header['MyCompany'][3]; | |
} | |
//add this module to it | |
$mycompany_admin_options_defs['Administration']['thismodule_license']= array('helpInline','LBL_THISMODULE_LICENSE_TITLE','LBL_THISMODULE_LICENSE','./index.php?module=ThisModule&action=license'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(empty($lead->id)) { | |
$lead->id = create_guid(); | |
$lead->new_with_id = true; | |
} | |
//BEGIN - eggsurplus - update existing leads | |
if(!empty($_POST['record'])) { | |
//get the existing bean (returns null if a bad ID is passed so a new Lead will be created still) | |
$lead = BeanFactory::getBean('Leads',$_POST['record']); | |
$lead->new_with_id = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
/********************************************************************************* | |
* SugarCRM Community Edition is a customer relationship management program developed by | |
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. | |
* | |
* This program is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU Affero General Public License version 3 as published by the | |
* Free Software Foundation with the addition of the following permission added | |
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$viewdefs ['Employees'] = | |
array ( | |
'EditView' => | |
array ( | |
'templateMeta' => | |
array ( | |
'maxColumns' => '2', | |
'widths' => | |
array ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This file goes in /custom/modules/Employees/Save.php | |
// For SugarCRM CE 6.5.16 - the relevant code is in the CUSTOM CODE section commented below | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
require_once('modules/MySettings/TabController.php'); | |
$tabs_def = urldecode(isset($_REQUEST['display_tabs_def']) ? $_REQUEST['display_tabs_def'] : ''); | |
$DISPLAY_ARR = array(); | |
parse_str($tabs_def,$DISPLAY_ARR); |
NewerOlder