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 | |
/* | |
* Copyright 2015 SugarCRM Inc. | |
*/ | |
/** | |
* Example of a module logic hook that we will unit test | |
*/ | |
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
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
({ | |
/** | |
* Copyright 2015 SugarCRM Inc. Licensed by SugarCRM under the Apache 2.0 license. | |
*/ | |
plugins: ['Dashlet'], | |
/** | |
* Record ID that is in context | |
*/ | |
record: undefined, |
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 | |
/** | |
* Copyright 2015 SugarCRM Inc. Licensed by SugarCRM under the Apache 2.0 license. | |
*/ | |
$viewdefs['base']['view']['xyz_contextual-iframe'] = array( | |
//Dashlet metadata | |
'dashlets' => array( | |
array( | |
'label' => 'LBL_XYZ_IFRAME_DASHLET_LABEL', | |
'description' => 'LBL_XYZ_IFRAME_DASHLET_DESCRIPTION', |
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
SugarClient client = new SugarClient(sugarUrl); | |
SugarSession session = client.getSugarSession("user", "password"); | |
SugarBean bean = client.getBean(session, "Opportunities", "...GUID..."); | |
System.out.println("Opportunity Name: " + bean.get("name")); |
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
({ | |
extendsFrom: 'RecordView', | |
/** | |
* Some extra functionality | |
*/ | |
doSomethingCool: function() { | |
}, | |
_dispose: function() { |
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
/* | |
* Basic Jasmine tests for Case Count by Status dashlet | |
*/ | |
ddescribe("Case Count by Status", function () { | |
/* | |
* Some useful constants for our tests. | |
* We use them to keep track of the module, layout, and view we are testing | |
*/ | |
var moduleName = 'Cases'; | |
var viewName = 'case-count-by-status'; |
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
/* | |
* Basic Jasmine test template for any Sugar 7 view | |
*/ | |
ddescribe("Jasmine template for Sugar 7 views", function () { | |
/* | |
* Some useful constants for our tests. | |
* We use them to keep track of the module, layout, and view we are testing | |
*/ | |
var moduleName = 'Accounts'; //TODO CHANGE TO AN APPROPRIATE MODULE | |
var viewName = "CHANGE_ME"; //TODO CHANGE TO YOUR VIEW NAME |