Skip to content

Dave Helgerson

Salesforce Software Development and Consulting

Menu
  • Contact
  • Resume
Menu

Category: Salesforce

Alert with Three Options – jQueryUI in a Salesforce Custom Button

August 18, 2016October 22, 2016

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 more
Categories: JavaScript / Salesforce

Using the Enter Keypress Event in Visualforce to Search or Change Checkbox Properties

December 19, 2015December 28, 2015

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 more
Categories: JavaScript / Salesforce / Visualforce

Javascript Popup Window Tips for Salesforce

September 15, 2015April 17, 2016

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
Categories: Development / JavaScript / Salesforce

Remove Last Comma or Other Characters from the End of a String

March 28, 2015March 28, 2015

Apex Removing the last comma is often needed when dynamically building a SOQL Select string. Salesforce quietly released a bunch of new string methods in Winter ’13 that I have started to really appreciate. One of the new methods is removeEnd() and removeEndIngoreCase(). These are great for removing that last comma. String soql = ‘Select…

Read more
Categories: Apex / JavaScript / Salesforce

HTML Line Breaks in Visualforce using Escape=false with Encoding

February 12, 2015February 12, 2015

Using a Visualforce tag with the escape=off option may help send an html tag like a line break to the page. However, escape=off can open cross-site scripting vulnerabilities. Visualforce encoding functions HTMLENCODE, JSENCODE, JSINHTMLENCODE, and URLENCODE help avoid the vulnerabilities, but they also prevent \n new line characters and html tags from showing on the…

Read more
Categories: Salesforce / Visualforce
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
Super Clone Pro
© 2023 Dave Helgerson | Powered by Minimalist Blog WordPress Theme
 

Loading Comments...