Last active
February 9, 2016 11:21
-
-
Save esimonetti/192f02635651e8b96d91 to your computer and use it in GitHub Desktop.
Execute custom code after loading a SugarCRM case with high priority on the record view (custom/modules/Cases/clients/base/views/record/record.js) - Gist created for: https://community.sugarcrm.com/sugarcrm/topics/excute_javascript_once_page_is_fully_loaded_in_sugar_7
This file contains hidden or 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', | |
initialize: function(options) | |
{ | |
this._super('initialize', [options]); | |
}, | |
_render: function() | |
{ | |
this._super('_render'); | |
this.myCustomLogicOnCases(); | |
}, | |
myCustomLogicOnCases: function() | |
{ | |
// when case priority is High... | |
if(this.model.get('priority') == 'P1') | |
{ | |
// log something on the console | |
console.log('executing my custom action for cases with high priorities...'); | |
} | |
}, | |
_dispose: function() | |
{ | |
this._super('_dispose'); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment