Difference between map and set in Salesforce
Set: A set is an unordered collection of primitives or sObjects that do not contain any duplicate elements. Map: A map is a collection of key-value pairs where ....
Set: A set is an unordered collection of primitives or sObjects that do not contain any duplicate elements. Map: A map is a collection of key-value pairs where ....
The main use of System.debug() is to track the flow of program and find errors. Example: parsedCSVdata = parseCSV(fileString,false); System.debug('Parsed CSV Data -->' + parsedCSVdata); To see this go to Setup ....
Visualforce page: <apex:page controller="ImportCtrlr"> <apex:form > <apex:pageblock > <apex:pageBlockSection columns="2"> <apex:pageBlockSectionItem > <apex:outputLabel value="Select Object"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:selectList size="1" value="{!obj}" > <apex:selectOptions value="{!objs}"/> </apex:selectList> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Select ....
To truncate string using apex in Salesforce String str = 'sfdcblog'; String trucatedStr = str.substring(0,3); Cheers!!!
To parse CSV to sObject using Apex in Salesforce, use the below link to get the code http://wiki.developerforce.com/page/Code_Samples#Parse_a_CSV_with_APEX Sample code: public List<List<String>> parseCSV(String contents,Boolean skipHeaders) { List<List<String>> allFields = new ....
Sample code: //Just to display, use the below code. public class ImportCtrlr { public Map<String, Schema.SObjectType> objs {get; set;} public ImportCtrlr() { objs = Schema.getGlobalDescribe(); } } For ....
Visualforce: <apex:page standardController="Photo__c" extensions="SlideShow" sidebar="false"> <apex:form > <center> <apex:image url="{!tmp}"/> <br/> <br/> <br/> <apex:commandButton action="{!prev}" value="Previous"/> <apex:commandButton action="{!nxt}" value="Next"/> </center> </apex:form></apex:page> Apex Controller: Public Class SlideShow { public List<Photo__c> ....
Use the future annotation to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available resources. For example, you ....
To insert line break in email message using Apex in Salesforce, we have to use <br> tag. setHtmlBody() method is used here to send the email in HTML format. Sample ....
Enhanced lists give you the ability to quickly view, customize, and edit list data to speed up your daily productivity. <apex:enhancedList type="Member__c" rowsPerPage="10" height="500"/> 'rowsPerPage' attribute must be one of ....