Eclipse can be setup to display code in an infinite number of ways. The following settings are how I like to configure the Eclipse Force.com IDE. Spaces instead of tabs Show line numbers Show whitespace characters Show a print margin These settings can be changed at: Window -> Preferences -> General -> Editors -> Text…
Read moreCategory: Development
Javascript 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 moreSalesforce Describe Methods – Record Types, Fields, and Global Describe
Record Type Describe Getting an object’s record type Id is simple with the statement below, and it avoids using a SOQL statment on the RecordType object. However, the method name is misleading because getRecordTypeInfosByName actually retrieves the record type with the Label and not the Name. Also, be careful because the name is case sensitive….
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