View MyCustomApi.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/clients/base/api/MyCustomApi.php */ | |
class MyCustomApi extends SugarApi { | |
public function registerApiRest() { | |
return array( | |
'myCustomMethod' => array( | |
'reqType' => 'GET', |
View email.ext.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/Extension/modules/Accounts/Ext/LogicHooks/email.ext.php */ | |
$hook_array['after_save'][] = array( | |
102, | |
'Send email test', | |
'custom/modules/Accounts/pmseSend.php', | |
'emailTest', | |
'emailTest' |
View file.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* File: ./custom/clients/base/fields/file/file.js */ | |
extendsFrom: 'FileField', | |
_doValidateFileError: function(fields, errors, callback, resp) { | |
app.alert.dismiss('upload'); | |
app.logger.fatal(resp); |
View customController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myCustomJSMethod: function(module, guid){ | |
//Instantiate a SugarBean object representing record identified by GUID | |
var beanObject = app.data.createBean(module, {id:guid}); | |
//Send request to REST v10 API to retrieve the record | |
beanObject.fetch({ | |
//Define the anonymous function that will execute on a successful response | |
success: function(data){ //the data parameter represents the JSON response from the API | |
//Do something with the response upon successful request |
View CustomFilterAPI.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/modules/Accounts/clients/base/api/CustomFilterApi.php */ | |
require_once 'clients/base/api/FilterApi.php'; | |
class CustomFilterApi extends FilterApi | |
{ | |
public function registerApiRest() | |
{ |
View hide_panel.ext.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/Extension/modules/Opportunities/Ext/Dependencies/hide_panel.ext.php */ | |
$dependencies['Opportunities']['hide_panel'] = array( | |
'hooks' => array("edit"), | |
'trigger' => 'equal($sales_stage, "Closed Lost")', | |
'triggerFields' => array('sales_stage'), | |
'onload' => true, | |
'actions' => array( |
View set_required.ext.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This example sets the Status Description field to required | |
if the Status field is set to 'Dead' within Leads module. | |
File: ./custom/Extension/modules/Leads/Ext/Dependencies/set_required.ext.php */ | |
$dependencies['Leads']['req_status_desc_dep'] = array( | |
'hooks' => array("edit"), | |
'trigger' => 'true', |
View GetYTDValueExpression.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/include/Expressions/Expression/String/GetYTDValueExpression.php */ | |
require_once('include/Expressions/Expression/String/StringExpression.php'); | |
class GetYTDValueExpression extends StringExpression | |
{ | |
function evaluate() { |
NewerOlder