Skip to content

Instantly share code, notes, and snippets.

<?php
'dashlet_display_row_options' =>
array (
0 => '1',
1 => '3',
2 => '5',
3 => '10',
4 => '20',
),
<?php
/**
* THIS CLASS IS FOR DEVELOPERS TO MAKE CUSTOMIZATIONS IN
*/
require_once('modules/new_module/new_module_sugar.php');
class new_module extends new_module_sugar
{
function set_notification_body($xtpl, $bean)
--clipped previous template code--
<!-- BEGIN: new_module_Subject -->
SugarCRM New Module Record - {NAME}
<!-- END: new_module_Subject -->
<!-- BEGIN: new_module -->
{ASSIGNER} has assigned a new module record to {ASSIGNED_USER}.
You may review this record at:
<?php
$dictionary['test_flexparent']['fields']['parent_name'] = array(
'required' => false,
'source' => 'non-db',
'name' => 'parent_name',
'vname' => 'LBL_FLEX_RELATE',
'type' => 'parent',
'massupdate' => 0,
'comments' => '',
<?php
$app_list_strings['moduleList']['test_flexparent'] = 'Flex Parent';
$app_list_strings['test_flexparent_options'] = array(
'' => '',
'Contacts' => 'Contact',
'Leads' => 'Lead',
);
<?php
$dictionary['Contact']['fields']['test_flexparent'] = array(
'name' => 'test_flexparent',
'type' => 'link',
'relationship' => 'test_flexparent_contacts',
'module'=>'test_flexparent',
'bean_name'=>'test_flexparent',
'source'=>'non-db',
'vname'=>'LBL_TEST_FLEXPARENT',
<?php
$layout_defs['Contacts']['subpanel_setup']['test_flexparent'] = array(
'order' => 130,
'module' => 'test_flexparent',
'get_subpanel_data'=>'test_flexparent',
'sort_order' => 'asc',
'sort_by' => 'name',
'subpanel_name' => 'default',
'title_key' => 'LBL_TEST_FLEXPARENT',
<?php
$mod_strings['LBL_TEST_FLEXPARENT'] = 'Flex Parent';
<?php
function process()
{
// Custom SQL
$lvsParams = array(
'custom_select' => ',calls.id AS call_id',
'custom_from' => ' LEFT JOIN calls ON calls.parent_id = accounts.id',
'custom_where' => ' AND (calls.id IS NULL)',
'distinct' => true
<?php
function buildWhere()
{
global $current_user;
$returnArray = array();
array_push($returnArray, '(1=1 OR \'dummystring\' = \'');
return $returnArray;