This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('modules/SugarFeed/feedLogicBase.php'); | |
class LeadFeed extends FeedLogicBase | |
{ | |
public $module = 'Leads'; | |
public function pushFeed($bean, $event, $arguments) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"" . $ns . "\"/>\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"http://schemas.xmlsoap.org/soap/encoding/\"/>\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$account = new Account(); | |
$account->retrieve($_REQUEST['record']); | |
$contacts = $account->get_linked_beans('contacts','Contact'); | |
foreach ( $contacts as $contact ) { | |
echo "{$contact->name}\n" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('include/SugarPHPMailer.php'); | |
$emailObj = new Email(); | |
$defaults = $emailObj->getSystemDefaultEmail(); | |
$mail = new SugarPHPMailer(); | |
$mail->setMailerForSystem(); | |
$mail->From = $defaults['email']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installdefs = array( | |
'pre_execute'=>array( | |
0 => '<basepath>/pre_install_actions.php', | |
), | |
'post_execute'=>array( | |
0 => '<basepath>/post_install_actions.php', | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns an array of indices for the current module | |
* | |
* @return array | |
*/ | |
private function _getIndexVardefs() | |
{ | |
$indexes = $this->_focus->getIndices(); | |
if ( $this->_focus->getFieldDefinition('email1') ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dictionary['Contact']['indices'][] = array( | |
'name' => 'special_idx_first_last_email', | |
'type' => 'index', | |
'source' => 'non-db', | |
'fields' => array('first_name','last_name','email1') | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sea = new SugarEmailAddress; | |
// Add a primary email address | |
$sea->addAddress($primaryemailaddress, true); | |
// Add an invalid email address | |
$sea->addAddress($primaryemailaddress, false, null, true); | |
// Add an email address that should be marked opt-out | |
$sea->addAddress($primaryemailaddress, false, null, false, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sea = new SugarEmailAddress; | |
// Grab the array of addresses | |
$addresses = $sea->getAddressesByGUID($id, $module); | |
foreach ( $addresses as $address ) { | |
echo $address->email_address . "\n"; | |
} |