How to create RowID in Tables : Here is the Code or Script Code for ID creation

If you are looking for to How to create RowID in Tables : Here is the Code or Script Code for ID creation, Find below a simple Script or Code for generating Row ID or Record ID in Tables for Salesforce public void viewTracking(){ if(trackingRow != null){ list rowId = trackingRow.split(‘:’); if(rowId.size() >1){ //system.debug(‘***’+ integer.valueof(rowId[(rowId.size()-2)])); Tracking […]

How to Sort an Apex class Object List

How to Sort an Apex class Object List [Edit : Now there is an interface natively provided by salesforce to sort the class object lists] I recently needed to sort an apex class object List which was retrieved through a webservice callout as it could not be sorted at the service end. This is the […]

How to Filter list alphabetically

How to Filter list alphabetically There was a requirement where i needed to build a list which can be filtered based on the starting alphabet. And also the List needs to remember the selections made as we move through other pages. | Please wait… In the VF page i am displaying the List ‘CurrentLsit‘ which […]

How to Identify SobjectType Dynamically in Apex

Here is a script that answers your How to Identify SobjectType Dynamically in Apex getKeyPrefix of Schema.getGlobalDescribe can be used to identify dynamically the SobjectType in Apex. String prefix = recordId.substring(0,3); String objectType; Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe(); for(Schema.SObjectType s : gd.values()){     if(prefix == s.getDescribe().getKeyPrefix()){         objectType = s.getDescribe().Name;     } } recordId consists […]

How to Build your Own Standard set controller

Standard set controller can be used for many objects . Recently i found that it cannot be used with activity objects(Open activity and activity history). Also there are many other Restrictions placed on these objects. You cannot query on these objects directly. It has to be a nested SOQL within an object using a relationship […]