Skip to content

Instantly share code, notes, and snippets.

<?php
$searchFields['Calls']['account_postcode'] = array(
'query_type' => 'default',
'operator' => 'subquery',
'subquery' => 'SELECT id FROM accounts WHERE accounts.deleted=0 AND billing_address_postalcode LIKE',
'db_field' => array(
'parent_id',
),
);
((calls.parent_id IN (SELECT id FROM accounts WHERE accounts.deleted=0 AND billing_address_postalcode LIKE '40323%')))
<?php
'account_postcode' => array (
'name' => 'account_postcode',
'label' => 'LBL_Account_postcode',
'type' => 'name',
'default' => true,
'width' => '10%',
),
{capture name=getLink assign=link}{{sugarvar key='value'}}{/capture}
{{if $vardef.gen}}
{sugar_replace_vars subject='{{$vardef.default|replace:'[current_user_id]':$current_user->id|replace:'{':'['|replace:'}':']'}}' assign='link'}
{{/if}}
{if !empty($link) && $link != "http://"}
{* // Start customization *}
{capture assign=link}{$link|replace:'[current_user_id]':$current_user->id}{/capture}
{* // End customization *}
{capture name=getStart assign=linkStart}{$link|substr:0:7}{/capture}
<iframe src="{if $linkStart != 'http://' && $link}http://{/if}{$link}" height="{{sugarvar key='height'}}" width="100%"/></iframe>
<?php
function get_list_view_data(){
--clipped code--
// Grab the contact phone number
if ( !empty($this->contact_id) ) {
$contactFocus = new Contact;
$contactFocus->retrieve($this->contact_id);
<?php
$listViewDefs ['Calls'] =
array (
--clipped code--
'CONTACT_PHONE_WORK' =>
array (
'width' => '10%',
<?php
$dictionary['YOUR_MODULE']['fields']['NAME_OF_FIELD_TO_SEARCH']['unified_search'] = true;
<?php
$searchFields['YOUR_MODULE']['NAME_OF_FIELD_TO_SEARCH'] = array( 'query_type'=>'default');
<?php
$module_menu[] =
Array("javascript:window.open('http://localhost/sugarcrm/index.php?entryPoint=custompage','CustomMessage','width=900,height=800,scrollbars=yes');","CustomMessage","custompage", 'mod1');
<?php
$dictionary['MODULE_NAME']['fields']['FIELD']['type'] = 'multienum';
$dictionary['MODULE_NAME']['fields']['FIELD']['isMultiSelect'] = true;