Skip to content

Instantly share code, notes, and snippets.

View KyleGawryluk's full-sized avatar

Kyle Gawryluk KyleGawryluk

  • SGH Redglaze Holdings Inc
View GitHub Profile
/**
* Post Relationship
* @param string $key API Key
* @param string $time API Timestamp
*
* Required Parameters
* 'module1' = (string) Portal Module Name
* 'id1' = (string) Record Sugar ID
* 'module2' = (string) Portal Module Name
* 'id2' = (string) Record Sugar ID
@KyleGawryluk
KyleGawryluk / gist:7663759
Last active December 29, 2015 11:29
Add error messages to Jeffery Way's FormField class
/**
* Create the form field
*
* @param string $name
* @param array $args
*/
protected function createField($name, $args)
{
// If the user specifies an input type, we'll just use that.
// Otherwise, we'll take a best guess approach.
public function set_relationship($module_name, $module_id, $link_field_name, $related_ids, $delete = 0){
$call_arguments = array(
'session' => $this->session,
'module_name' => $module_name,
'module_id' => $module_id,
'link_field_name' => $link_field_name,
'related_ids' => array($related_ids),
'name_value_list' => array(),
'delete' => $delete,
);
@KyleGawryluk
KyleGawryluk / gist:7418600
Created November 11, 2013 19:09
SugarCRM - Generating custom error popup from logic hook
Create a custom view to load popup widget js
custom/modules/{module}/views/view.detail.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/json_config.php');
require_once('include/MVC/View/views/view.detail.php');
class po_purchaseOrdersViewDetail extends ViewDetail {
foreach ($clients as client){
$m->to($client->email, $client->first_name . ' ' . $client->last_name);
}