Skip to content

Instantly share code, notes, and snippets.

View betobaz's full-sized avatar

Betobaz betobaz

  • Betobaz
  • Veracruz, Mexico
View GitHub Profile
@betobaz
betobaz / custom__modules__<module>__clients__base__views__record__record.js
Created September 11, 2015 18:22
SugarCRM: Sidecar: Set readonly to field
({
initialize: function(){
this._super("initialize", arguments);
var field = this.getField('field_name');
field.setMode('readonly');
field.setMode('edit');
field.setMode('detail');
}
})
@betobaz
betobaz / collection_filter.js
Created September 25, 2015 16:45
SugarCRM:Sidecar:Collection fetch with filter
// Nombre del modulos a consultar
var moduleName = "T01_Telefonos";
// Filtros que se desean aplicar
var filters = [
// Se va a filtrar por la relacion que tiene el modulo con cuentas
{t01_telefonos_accountsaccounts_ida: "eff78d90-03c1-dbd0-fe8e-55f060047d98"}
];
// Se crea un collecion del modulo, el cual se va a llenar cuando el api nos de respuesta
var telCollection = App.data.createBeanCollection(moduleName);
// Se realiza la peticion
@betobaz
betobaz / app.js
Created December 16, 2011 22:41
node.js Upload file formidable
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, stylus = require('stylus')
, util = require('util')
//, form = require('connect-form')
@betobaz
betobaz / modify_config_db_sugarcrm
Created March 24, 2012 15:37
modificación configuración base de datos sugarcrm
...
array (
'db_host_name' => <nombre del host>,
'db_host_instance' => <nombre de la instancia>,
'db_user_name' => <nombre de usuario>,
'db_password' => <password>,
'db_name' => <nombre de la base de datos>,
'db_type' => 'mssql', //El tipo de la base de datos
),
...
@betobaz
betobaz / sugar git init
Created March 24, 2012 15:38
sugar git init
#cd sugar_dir
#git init
#git add .
#git commit -m "primer commit de sugar de pruebas"
@betobaz
betobaz / gist:2184553
Created March 24, 2012 15:56
codigo para pasar la comprobación de archivos al actualizar sugar crm
handleUploadCheck('systemCheck', true);
if(!true) return;
upgradeP('systemCheck', false);
document.getElementById('form').step.value='2';
handlePreflight('systemCheck');
document.getElementById('form').submit();
@betobaz
betobaz / gist:2185627
Created March 24, 2012 17:56
comando silentupgrade
php.exe -f silentUpgrade.php [upgradeZipFile] [logFile] [pathToSugarInstance] [adminUser]
@betobaz
betobaz / gist:2186318
Created March 24, 2012 18:39
inicia silentupgrade sugarcrm
********************************************************************
***************This Upgrade process may take sometime***************
********************************************************************
@betobaz
betobaz / gist:2186218
Created March 24, 2012 18:35
comando silentupgrade sustituyendo valores
php.exe -f silentUpgrade.php "c:\upgrades\SugarCE-6.2.x-to-6.4.0.zip" "c:\upgrades\silent_upgrade.log" "c:\xampp\htdocs\sugarcrm_test" "admin"
@betobaz
betobaz / gist:2186431
Created March 24, 2012 18:43
success upgradesilent
********************************************************************
*************************** SUCCESS*********************************
********************************************************************
******** If your pre-upgrade Leads data is not showing ************
******** Or you see errors in detailview subpanels ****************
************* In order to resolve them ****************************
******** Log into application as Administrator ********************
******** Go to Admin panel ****************************************
******** Run Repair -> Rebuild Relationships **********************
********************************************************************