Skip to content

Instantly share code, notes, and snippets.

<?php
function process()
{
global $current_language, $app_list_strings, $image_path, $current_user;
$mod_strings = return_module_language($current_language, 'Meetings');
$lvsParams = array(
'custom_select' => '',
where (((1=1 OR 'dummystring' = ')) AND custom_module.deleted=0'))) AND custom_module.id is null
var tab0 = EditView_tabs.getTab(0);
function handleClick(e) {
alert(e.target);
}
tab0.addListener('click', handleClick);
<?php
// specify the REST web service to interact with
$url = 'localhost/~jmertic/sugarcrm/service/v4_1/rest.php';
// Open a curl session for making the call
$curl = curl_init($url);
// Tell curl to use HTTP POST
curl_setopt($curl, CURLOPT_POST, true);
<?php
// specify the REST web service to interact with
$url = 'localhost/~jmertic/sugarcrm/service/v4_1/rest.php';
// Open a SugarHttpClient session for making the call
$client = new SugarHttpClient;
// Set the POST arguments to pass to the Sugar server
$parameters = array(
{literal}
<script type="text/javascript">
// <![CDATA[
$.getScript("http://joind.in/widget/widget.php", function() {
joindin.draw(document.getElementById('joindin_id').innerHTML,"joindin_widget");
});
// ]]>
</script>
{/literal}
<?php
require_once("include/ListView/ListViewFacade.php");
// Create the bean for the module you want a listview for
$mybean = new Account;
// build listview facade object
$lvf = new ListViewFacade($mybean, $mybean->module_dir, 0);
<?php
if (file_exists('./custom/modules/jjwg_Maps/tpls/' . $module_type . 'InfoWindow.tpl')) {
$marker['html'] = $this->sugarSmarty->fetch('./custom/modules/jjwg_Maps/tpls/' . $module_type . 'InfoWindow.tpl');
} else {
$marker['html'] = $this->sugarSmarty->fetch('./modules/jjwg_Maps/tpls/' . $module_type . 'InfoWindow.tpl');
}
<?php
$marker['html'] = $this->sugarSmarty->fetch(get_custom_file_if_exists('./modules/jjwg_Maps/tpls/' . $module_type . 'InfoWindow.tpl'));
<?php
$dependencies['Contacts']['dynamic_rollup_dep'] = array(
'hooks' => array("edit", "view"), //not including save so that the value isn't stored in the DB
'trigger' => 'true', //Optional, the trigger for the dependency. Defaults to 'true'.
'triggerFields' => array('status'),
'onload' => true,
'actions' => array(
array(
'name' => 'SetValue',