Visualforce PageMessage Samples

I can never remember what the different Visualforce page message options look like between the severity and strength so here are the options along with the code.

Visualforce Date Popup

If you work with Visualforce and the first field on your page is a date you’ll notice that when the page loads it’ll automatically open the date picker which is often not desirable. To fix this simply place this Javascript on your page: <Script> function setFocusOnLoad() {} </Script>

Add Embedded Google Maps on Leads, Accounts, and Contacts

Here’s how we can get a very nice looking Google map tied to the current Lead, Account, or Contact that you are currently viewing.   First create a new Visualforce page (Setup > Develop > Page) for each of the types, here is the code for each: Leads: [html] <apex:page standardController="Lead"> <apex:pageBlock > <head> <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> …