Skip to content

Instantly share code, notes, and snippets.

<input ... width="6" maxlength="20" />
if ($bean->fetched_row['my_field'] !== $bean->my_field) {
// Do custom logic
}
if (empty($bean->fetched_row['id']) {
// Do custom logic for only a newly created record
}
<?php
require_once('modules/SugarFeed/feedLogicBase.php');
class LeadFeed extends FeedLogicBase
{
public $module = 'Leads';
public function pushFeed($bean, $event, $arguments)
{
<?php
require_once('modules/SugarFeed/feedLogicBase.php');
class NoteFeed extends FeedLogicBase
{
public $module = 'notes';
public function pushFeed($bean, $event, $arguments)
{
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"http://schemas.xmlsoap.org/soap/encoding/\"/>\n";
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"" . $ns . "\"/>\n";
<?php
$account = new Account();
$account->retrieve($_REQUEST['record']);
$contacts = $account->get_linked_beans('contacts','Contact');
foreach ( $contacts as $contact ) {
echo "{$contact->name}\n"
}
<?php
require_once('include/SugarPHPMailer.php');
$emailObj = new Email();
$defaults = $emailObj->getSystemDefaultEmail();
$mail = new SugarPHPMailer();
$mail->setMailerForSystem();
$mail->From = $defaults['email'];
<?php
$installdefs = array(
'pre_execute'=>array(
0 => '<basepath>/pre_install_actions.php',
),
'post_execute'=>array(
0 => '<basepath>/post_install_actions.php',
),
);