Skip to content

Instantly share code, notes, and snippets.

@cmourizard
cmourizard / vardefs.ext.php
Created July 16, 2015 13:08
Sugar 7 - Force auto populate without the confirm box
<?php
// Add fields in the mapping
$dictionary['Contact']['fields']['account_name']['populate_list']['team_id'] = 'team_id';
$dictionary['Contact']['fields']['account_name']['populate_list']['team_name'] = 'team_name';
$dictionary['Contact']['fields']['account_name']['populate_list']['team_set_id'] = 'team_set_id';
// Force the auto populate without the confirm box
$dictionary['Contact']['fields']['account_name']['auto_populate'] = true;
// Or add your custom alert mersssage
@cmourizard
cmourizard / SugarElasticsearchConfgWithAsciifolding.php
Created August 13, 2015 12:42
Elasticsearch configuration to enable asciifolding
<?php
$sugar_config['full_text_engine']['Elastic']['index_settings']['default']['index'] = array(
'analysis' => array(
'analyzer' => array(
'core_email_lowercase' => array(
'type' => 'custom',
'tokenizer' => 'uax_url_email',
'filter' => array(
'lowercase',
@cmourizard
cmourizard / PDF Template.html
Created March 13, 2016 10:42
Dealing with PDF Manager
<h1>Meeting Summary</h1>
Topic:&nbsp;{$fields.name}<br />
Description:&nbsp;{$fields.description}<br />
{if isset($contacts) and $contacts|@count gt 0}
<br />
<h2>Contact Guests</h2>
<table style="width: 100%;" border="0">
<tbody>
<tr>
<td><strong>Name</strong></td>