Skip to content

Dave Helgerson

Salesforce Software Development and Consulting

Menu
  • Contact
  • Resume
Menu

Author: daveh

Visualforce Help Text and a Popup Tool Tip

October 21, 2013March 16, 2014

Visualforce Field Help Text The help icon can be added to a Visualforce field within an apex:pageBlockSectionItem. Access the help text using the $ObjectType api. Put it in the helptext attribute of the apex:pageBlockSectionItem. {!$ObjectType.Account.Fields.Phone.InlineHelpText} Easy Hover Tooltip The following may help if you are not using the apex:pageBlockSectionItem. I’ve used this technique in the…

Read more
Categories: CSS / Development / Salesforce / Visualforce

Define and Initialize a Map, List, and Set in Apex

October 20, 2013March 11, 2020

The syntax for defining a list, map, and set collection with initial values sometimes slips my mind. The lack of () throws me off, so this post is to help out my future self. List Definition public list MyList = new list {‘AAA’, ‘AAA’, ‘BBB’, ‘BBB’, ‘CCC’}; Set Definition public set MySet = new <set>{‘A’,…

Read more
Categories: Apex / Development / Salesforce

Get the Salesforce Session ID

October 20, 2013June 25, 2016

Visualforce {!$API.Session_ID} Documentation: $API Variable Methods Apex String SessId = Userinfo.getSessionID(); Salesforce Documentation: UserInfo Methods Note: The session ID generated in the Visualforce page will not be the same as Userinfo method.

Read more
Categories: Apex / Development / Salesforce / Visualforce

Sort a list of sObjects: quick and dirty -or- elegant

October 2, 2013July 12, 2016

Quick and Dirty Here is a method that I’ve implemented to sort lists of objects by combinations of fields. I don’t claim that it is pretty, but it has worked for me. public static list SortTrf (list iMyObjList) { list SortStringList = new list(); list SortedObjList = new list(); map ObjMap = new map(); MyObj__c…

Read more
Categories: Apex / Development / Salesforce

Pad Number with Leading Zeros

October 1, 2013October 1, 2013

Left pad a number with leading zeroes Thanks to mauricekremer.dyndns.org for the concept and code. Below is my take on the function. public static String PadZeros(Integer Num, Integer Len) { String s = String.valueOf(Num); while (s.length() < Len) s = '0' + s; return s; }

Read more
Categories: Apex / Development / Salesforce
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Next
Super Clone Pro
© 2023 Dave Helgerson | Powered by Minimalist Blog WordPress Theme