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 | |
$sql = "SELECT id FROM products WHERE deleted=0"; | |
$result = $GLOBALS["db"]->query($sql); | |
while ($product = $GLOBALS["db"]->fetchByAssoc($result)) | |
{ | |
$product = BeanFactory::getBean("Products",$product["id"]); | |
$product->save(); | |
} |
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
ifElse( | |
$discount_select, | |
multiply( | |
subtract( | |
$discount_price, | |
multiply( | |
$discount_price, | |
divide( | |
$discount_amount, | |
100 |
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 | |
// ... | |
// CTCode Customization | |
// if the field name is ctc_ctcodes_accounts_name | |
// change the field def and field type to IN | |
if ($fieldName == 'ctc_ctcodes_accounts_name') | |
{ | |
$fieldName = 'id'; |
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 | |
$beanList['Opportunities'] = 'SOCustomOpportunity'; | |
$beanFiles['SOCustomOpportunity'] = 'custom/modules/Opportunities/SOCustomOpportunity.php'; | |
$objectList['Opportunities'] = 'Opportunity'; | |
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 | |
include('modules/MySettings/StoreQuery.php'); | |
class defaultSearch | |
{ | |
function filterList(&$bean, $event, $arguments) | |
{ | |
global $current_user, $sugar_config; |
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 | |
class Accounts_logic_hook_class | |
{ | |
function Accounts_logic_hook_method(&$bean, $event, $arguments) | |
{ | |
echo "Hit the Accounts before save logic hook"; | |
exit; | |
} | |
} |
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 | |
$mod_strings['LBL_ABC_MODULE_LINK2_TITLE'] = 'Link 2 Title'; // title of the link | |
$mod_strings['LBL_ABC_MODULE_LINK2_DESCRIPTION'] = 'The description for what link w will do. Put whatever you want here.'; // description for the link |
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 | |
// initialize a temp array that will hold the options we want to create | |
$links = array(); | |
// add button1 to $links | |
$links['abc_Module']['link1'] = array( | |
// pick an image from /themes/Sugar5/images | |
// and drop the file extension |
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 | |
class Break_AjaxUI | |
{ | |
static $first = false; | |
function echo_something($bean,$event,$arguments) | |
{ | |
// echo something once | |
if (!self::$first && isset($_REQUEST['action'] && $_REQUEST['action']=='DetailView') |