Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 2 Application Framework : Sugar Dashlets : Sugar Dashlets JavaScript

Sugar Dashlets JavaScript
Sugar Dashlet utility functions are located in include/JavaScript/Dashlets.js. This contains the following methods:
postForm: function(theForm, callback) {}
 
postForm method is used to post the configuration form via AJAX. The callback will usually be SUGAR.sugarHome.uncoverPage to remove the configuration dialog.
callMethod: function(DashletId, methodName, postData, refreshAfter, callback) {}
 
callMethod is a generic way to call a method in a Dashlet class. Use this function to generically call a method within your Dashlet class (php side). Optionally, you can refresh your Dashlet after a call and also utilize a callback function.
This method can also be used as a way to proxy AJAX calls to Web services that don’t exist on the SugarCRM install. (Google Maps Mash-ups for example.)

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License