Have you ever wanted to rotate through a series of Salesforce dashboards and have them auto refresh? There are multiple questions on the success community and other forums requesting exactly this. The easiest way to rotate through dashboards is to use a browser plugin that switches between pages. However, data in the dashboards can only…
Read moreCategory: JavaScript
Alert with Option Buttons in the Window Body – jQueryUI in a Salesforce Custom Button
Here is another example of using jQueryUI in a Salesforce custom button. I’m referencing Super Clone Pro pages that use different configurations for cloning in this example. This could easily be adapted for other pages or actions. Enjoy! {!REQUIRESCRIPT(‘//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js’)} {!REQUIRESCRIPT(‘//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js’)} var $j = jQuery.noConflict(); $j(function() { var winHead = ” + ”; var winBody =…
Read moreAlert with Three Options – jQueryUI in a Salesforce Custom Button
Recently, I was asked to create a custom button that would allow a user to choose between two SuperClone Configuration options. jQueryUI provides a nice modal dialog that solved the problem. The dialog showed two buttons for the configurations and a cancel button. Below is the sample code for what I put together. The actions…
Read moreUsing the Enter Keypress Event in Visualforce to Search or Change Checkbox Properties
Perform common actions like run a search or check a checkbox when the enter key is pressed, instead of form submission. The example below shows how to do this with help from jQuery in the Visualforce page. Things to notice: jQuery.noConflict() prevents conflicts with other javascript that Salesforce may have loaded. j$(document).ready will run the…
Read moreJavascript Popup Window Tips for Salesforce
Check if a Popup Blocker Prevented the Popup Window Most browsers will block popup windows the first time a popup window tries to appear. Here is how to check if a popup window was blocked. var win = window.open(“/apex/PopupWindowVfPage”, “MyWinName”, “height=500,width=500”); // set the focus new window win.focus(); // assign the methods focusPopup to the…
Read more