Skip to content

Instantly share code, notes, and snippets.

Avatar

Hector hectorrios

View GitHub Profile
@hectorrios
hectorrios / mapNewFields.php
Last active Jun 18, 2020
extend the modules/Leads/clients/base/layouts/convert-main.php layout via the Extension Framework
View mapNewFields.php
<?php
//File: /custom/Extension/modules/Leads/Ext/clients/base/layouts/convert-main/mapNewFields.php
//One Gotcha with this, this file will be required
//when metadata is being rebuilt and so you must avoid defining the following
//variable names here: $module and $type
//Doing so will override those variables in the MetaDatFiles parser and cause
//un-expected results.
@hectorrios
hectorrios / commentlog.php
Created Sep 6, 2019 — forked from esimonetti/commentlog.php
Show last 10 commentlog entries on Cases, with the newest one at the top
View commentlog.php
<?php
// Enrico Simonetti
// enricosimonetti.com
//
// 2018-12-28 Sugar 8.3.0
// Show last 10 commentlog entries on Cases, with the newest one at the top
//
// file: custom/Extension/modules/Cases/Ext/Vardefs/commentlog.php
//
@hectorrios
hectorrios / PostalCodeValidator.js
Last active Mar 18, 2020
Example of a SugarCRM sidecar Plugin that "mixes in" a keydown event listener for all postal code fields and makes a call to an Sugar REST endpoint to retrieve City name
View PostalCodeValidator.js
(function (app) {
app.events.on("app:init", function () {
/**
* This plugin allows views that contain *_postalcode attributes
* to be wired up with a keypress event that will contact a postal-code validator
* service
*
* <pre><code>
* {
* //Sample component
View set_dashboards_to_birgit.php
<?php
//-----------------------------------------------------------------------------
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
//-----------------------------------------------------------------------------
$db = DBManagerFactory::getInstance();
//-- TEMPLATE = birgit
$query = "SELECT id from users where user_name='birgit'";
$result = $db->query($query, true,"Error fetching birgit: ");
@hectorrios
hectorrios / dabblet.css
Created May 1, 2013
More fun with positioning
View dabblet.css
/**
* More fun with positioning
*/
div#page-wrap {
width: 700px;
margin: 25px auto;
border:1px dashed black;
background-color: rgba(0,0,0,0.5);
/* height:600px; */
display:inline-block;
View dabblet.css
/* DIV positioning */
#left-div {
width:400px;
border:1px solid red;
background-color:grey;
float:left;
}
#right-div {
@hectorrios
hectorrios / dabblet.css
Created Mar 15, 2013
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
div#page-wrap {
width: 500px;
margin: 25px auto;
}
.header {
@hectorrios
hectorrios / dabblet.css
Created Mar 15, 2013
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
div#page-wrap {
width: 500px;
margin: 25px auto;
}
.header {
@hectorrios
hectorrios / dabblet.css
Created Mar 9, 2013
More fun with positioning
View dabblet.css
/**
* More fun with positioning
*/
div#page-wrap {
width: 700px;
margin: 25px auto;
border:1px dashed black;
background-color: rgba(0,0,0,0.5);
/* height:600px; */
display:inline-block;
View dabblet.css
/**
* Positioning
*/
div {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
width: 100%;
padding: 20px;
box-sizing: border-box;
You can’t perform that action at this time.