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
// /modules/YOURMODULE/clients/base/layouts/setup/setup.php | |
$viewdefs[‘YOURMODULE’]['base']['layout']['setup'] = array( | |
'type' => 'simple', | |
'components' => | |
array( | |
array( | |
'view' => 'setup', | |
), | |
), | |
); |
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'); | |
class TeamSecurity extends SugarVisibility | |
{ | |
public function addVisibilityFrom(&$query) | |
{ | |
return $query; | |
} |
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
({ | |
/* Author: Angel Magaña -- cheleguanaco@cheleguanaco.com | |
* File: ./custom/clients/base/layouts/subpanels/subpanels.js | |
* | |
* Extended subpanels layout controller for hiding | |
* subpanels without data upon parent record load (Sugar 7.2+) | |
* | |
* This customization applies to all modules | |
*/ |
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[ $module_name ][ 'EditView' ] = array( | |
// CONTENT | |
'panels' => array( | |
// PANEL | |
'lbl_panel_1' => array( | |
// ROW |
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'); | |
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; |
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 | |
/* | |
* By installing or using this file, you are confirming on behalf of the entity | |
* subscribed to the SugarCRM Inc. product ("Company") that Company is bound by | |
* the SugarCRM Inc. Master Subscription Agreement ("MSA"), which is viewable at: | |
* http://www.sugarcrm.com/master-subscription-agreement | |
* | |
* If Company is not bound by the MSA, then by installing or using this file | |
* you are agreeing unconditionally that Company will be bound by the MSA and |
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
/** | |
* Case Count by Status example dashlet controller | |
* | |
* Controller logic watches the current collection on display and updates the | |
* dashlet automatically whenever the current collection changes. | |
* | |
* This is a simple example of a dashlet for List Views in Sugar 7.x. | |
* | |
**/ | |
({ |
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
var sys = require('util'), | |
rest = require('restler'); | |
var baseurl = "<<instance URL>>/rest/v10" | |
// get oAuth token | |
var jsonData = {"grant_type":"password","username":"<<username>>","password":"<<password>>","client_id":"sugar"}; | |
rest.postJson(baseurl+'/oauth2/token', jsonData).on('2XX', function(data) { | |
if ( data.error ) { | |
sys.puts("Error: " + data.error_message); |
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 | |
// Documentation.- http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.7/Architecture/Sugar_Logic/Dependency_Actions/ | |
$dependencies['Meetings']['readonly_fields'] = array( | |
'hooks' => array("edit"), // values : "edit", "view", "save" and "all" | |
'trigger' => 'equal($status,"Held")', //Optional, the trigger for the dependency. Defaults to 'true'. | |
'triggerFields' => array('status'), // The list of fields to watch for change events. When changed, the trigger expressions will be recalculated. | |
'onload' => true, // Whether or not to trigger the dependencies when the page is loaded. | |
//Actions is a list of actions to fire when the trigger is true | |
// You could list multiple fields here each in their own array under 'actions' | |
'actions' => 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
#! /usr/bin/env php | |
<?php | |
if(!isset($argv[1])){ | |
die("Usage: php getdbbackup.php <path to config.php file>\nExample: php getdbbackup.php ../config.php"); | |
} | |
require $argv[1]; | |
print_r($sugar_config['dbconfig']); | |
$db_host_name = $sugar_config['dbconfig']['db_host_name']; | |
$db_user_name = $sugar_config['dbconfig']['db_user_name']; |
OlderNewer