Posts

Showing posts from June, 2014

Tips for Migrating from Eclipse to IntelliJ - Re-learning shortcuts and other Tips

Image
Migrating from Eclipse to IntelliJ:  Re-learning shortcuts and other Tips As a long-time Eclipse user(Spring Tools Suite and Groovy and Grails Tools Suite), the transition to using IntelliJ was jarring in many ways.  Keyboard shortcuts are different, the layout is different and the way you do things is different. It is worth it to go through with the transition.  Auto-complete and searching is better.  Logs and consoles are better.  The tooling is better.  There are plenty of articles out there that highlight the changes.  Most importantly though is that it is does everything you need well and is very fast. Here are some things that will help with your transition: How to Change the JDK Setup the JDK locations Here you will want to setup the location of the Java SDKs you have installed. Ctrl+Shift+Alt+S -> Platform Settings -> SDKs:  Change JDK Update the JDK in the IntelliJ IDE Setup the Project SDK T...

Salesforce Dynamically Populated List of Checkboxes in Visualforce and Apex

Image
Dynamically Populated List of Checkboxes in Visualforce and Apex Below you will find details on how to create a dynamic checkbox group on a custom Salesforce page using Apex and Visualforce. These examples will leverage Visualforce specific tags and Apex specific functionality to accomplish things that you would normally need an external library such as jQuery to acheive. Dynamic Array of Checkboxes Dynamically build an array of checkboxes and keep track of which boxes are checked.  Checkboxes will be populated from a SOQL query from a custom object in Salesforce.  Selected options will be tracked and persisted if you re-render the checkboxes. Visualforce Command button to refresh list of checkboxes <apex:commandButton action="{!refresh}" reRender="customCheckboxPanel" status="loadingDetails"> This is just an example.  A more practical use of this would be a onchange or onclick event such as if you had checkbo...

Viewing DEBUG statements in Salesforce APEX Files using the Browser Developer's Console

Image
How to view System Debug Statements in the Salesforce Dev Console Use system debug statements in your Apex code to log the info you need. system.debug('results ' + results); Open up the page and execute the behavior you are trying to monitor using system debug statements. Choose the Logs tab at the bottom of the console and double-click the most recent log for the page you are monitoring. i.e. apex/yourpage Select the Logs tab and open your log file Once the log is open you can either check the "DEBUG ONLY" checkbox or check the "Filter" checkbox and filter on the string "USER_DEBUG" or any custom string you are searching for specifically.  Both options are at the bottom of the console. Set the Filter to only display items containing "USER_DEBUG" Viewing logs in the browser in your Salesforce Instance If you are having trouble opening the logs in the Developer Console you can open the logs in...