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 moreCategory: Visualforce
Salesforce Visualforce markup language
HTML Line Breaks in Visualforce using Escape=false with Encoding
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 moreVisualforce Remote Objects – Retrieve Offset Paging Example
Below is a simple example of retrieving Account records using Salesforce Remote Objects. I imagine the paging functionality could be better, but it works to show how the offset property can be conditionally added to the query parameters JSON Object.
Read moreIn-line Editing Visualforce Component for Any Object
This is a Visualforce component for in-line editing of an object’s child or related records. It will work for most Salesforce standard and custom objects. Pass in parameters to change what is displayed and if the user can add, edit, or delete records. Required Parameters aParentRecId: Parent Record Id. This is used to select the…
Read moreVisualforce Table with Alphabet Filter and Sortable Columns
This Visualforce page contains apex:pageBlockTable to demonstrate a few different concepts. Sortable Columns in an apex:pageBlockTable Alphabet Filter that filters on the current sorted column Use of the ApexPage StandardSetController Selecting an individual record in the table using a link Selecting multiple records with a column of checkboxes using a Sub Class(Wrapper Class) to hold…
Read more