Skip to content

Instantly share code, notes, and snippets.

View sugarknowledge's full-sized avatar

Knowledge Manager sugarknowledge

View GitHub Profile
@sugarknowledge
sugarknowledge / SOAP_PHP_set_note_attachment.php
Created November 20, 2012 18:41
PHP Example using NuSOAP with the v4 SOAP API to create a note with an attachement
<?php
$url = "http://{site_url}/service/v4/soap.php?wsdl";
$username = "admin";
$password = "password";
//require NuSOAP
require_once("./nusoap/lib/nusoap.php");
//retrieve WSDL
@sugarknowledge
sugarknowledge / REST_PHP_set_note_attachment.php
Created November 20, 2012 18:10
PHP Example using cURL with the v4 REST API to create a note with an attachement
<?php
$url = "http://{site_url}/service/v4/rest.php";
$username = "admin";
$password = "password";
//function to make cURL request
function call($method, $parameters, $url)
{
ob_start();
@sugarknowledge
sugarknowledge / SOAP_PHP_set_document_revision.php
Created November 20, 2012 17:50
PHP Example using NuSOAP with the v4 SOAP API to create a document
<?php
$url = "http://{site_url}/service/v4/soap.php?wsdl";
$username = "admin";
$password = "password";
//require NuSOAP
require_once("./nusoap/lib/nusoap.php");
//retrieve WSDL
@sugarknowledge
sugarknowledge / REST_PHP_set_document_revision.php
Created November 20, 2012 16:09
PHP Example using cURL with the v4 REST API to create a document
<?php
$url = "http://{site_url}/service/v4/rest.php";
$username = "admin";
$password = "password";
//function to make cURL request
function call($method, $parameters, $url)
{
{{ syntax.php{code: "$sugar_config['default_email_charset'] = 'UTF8';"} }}
@sugarknowledge
sugarknowledge / fullFormCreateContacts.php
Created November 7, 2012 19:25
How to direct a user to the full-form create on a subpanel
<?php
$layout_defs["Accounts"]["subpanel_setup"]["contacts"]["top_buttons"] = array(
array(
'widget_class' => 'SubPanelTopCreateButton',
),
array(
'widget_class' => 'SubPanelTopSelectButton',
'mode' => 'MultiSelect',
),
@sugarknowledge
sugarknowledge / hideSelectContacts.php
Created November 7, 2012 19:14
How to remove the select button on a subpanel
<?php
$layout_defs["Accounts"]["subpanel_setup"]["contacts"]["top_buttons"] = array(
array(
'widget_class' => 'SubPanelTopButtonQuickCreate',
),
);
<?php
$manifest =array(
'acceptable_sugar_flavors' => array('CE','PRO','CORP','ENT','ULT'),
'acceptable_sugar_versions' => array(
'exact_matches' => array(),
'regex_matches' => array('6\\.[0-9]\\.[0-9]$'),
),
'author' => 'SugarCRM',
'description' => 'Installs updated layouts to the accounts module',
./custom/modules/Module_Name/logic_hooks.php
./custom/modules/Connectors/metadata/display_config.php