trigger.isInsert and trigger.isUpdate trigger.isInsert is true when a new record is created and inserted. trigger.isUpdate is true when an existing record is modified. Example: trigger memberInviteNotify on Member__c (after insert,after …
October 2012
-
-
How to get fields for sObject using Apex? Sample Code: public String obj {get;set;} public List<sObject> objLst {get;set;} public List<String> objFields {get;set;} Map<String , Schema.SObjectType> globalDescription = Schema.getGlobalDescribe(); Schema.sObjectType objType …
-
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 …
-
When to use triggers in Salesforce Triggers are used to perform immediate actions based on previous action. Example: field update A trigger is Apex code that executes before or after …
-
View State: The view state of a web page is composed of all the data that’s necessary to maintain the state of the controller during server requests (like sending or …
-
Differentiate between List, Set and Map in Salesforce List: List is a ordered collection of values. It contains duplicate values. Each value is retrieved using the List Index. Ex: List<String> …
-
Enforcing field level security using apex class: You can determine field level security by using getDescribe() . Below is the example of one such kind Schema.DescribeFieldResult fld = Account.Phone.getDescribe(); Boolean …
-
Bulk Enabled Triggers in Salesforce: it is strongly recommended that you make it bulk enabled, so that the trigger can handle number of records whcih can be inserted/updated/deleted through data …