SugarCRM

SugarCRM: Copy Saved Search

Posted on

This is an example query of how to duplicate a record on a MySQL DB. The only challenge here is to autogenerate de ID (this has to be done specifically based on your DB structure). SELECT id, name, search_module, deleted, date_entered, date_modified, assigned_user_id, contents, description FROM crm_em.saved_search WHERE search_module = “Leads” AND name = “Employees_Updated”; […]

SugarCRM

SugarCRM: Run Java Script from Custom logic hook

Posted on

    <?php if(!defined(‘sugarEntry’) || !sugarEntry) die(‘Not A Valid Entry Point’); class idempiere_sync { function idempiere_sync(&$bean, $event, $arguments) { require_once(‘log4php/LoggerManager.php’); $JAVA_HOME = “/usr/lib/jvm/java-8-openjdk-amd64”; $PATH = “$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin”; putenv(“JAVA_HOME=$JAVA_HOME”); putenv(“PATH=$PATH”); $output = shell_exec(‘/home/Scripts/talend/iDempiere/SugarCRM/CRM_iDempiere/CRM_iDempiere_run.sh’); echo $output; } } ?>

SugarCRM

SugarCRM: Higlight Invalid Emails

Posted on

line-throughline-through   /var/www/html/master/include/SugarEmailAddress/templates/forDetailView.tpl Around line 42   <td style=”border:none;”>{if $address.key === ‘opt_out’}<span style=”text-decoration: line-through; background: rgba(255, 255, 0, 0.3)”>{elseif $address.key === ‘invalid’}<span style=”text-decoration: line-through; background: rgba(255, 0, 0, 0.3)”>{elseif $address.key === ‘opt_out_invalid’}<span style=”text-decoration: line-through; background: rgba(255, 0, 0, 0.3)”>{elseif $address.key === ‘primary’}<b>{elseif $address.key === ‘reply_to’ && $item.key != 0}<i>{/if} {$address.address} {if $address.key === ‘primary’}</b>&nbsp;<i>&#x28;{$app_strings.LBL_EMAIL_PRIMARY}&#x29;&#x200E;</i>{elseif $address.key […]