To perform the validations we should use before triggers.
If you are updating any field on the same object on which you are writing the trigger and no need to explicitly include the DML statemetns (already due to DML operation only trigger fire and it is still in progress at this point of time.)
2. After Triggers:
If you are dealing with relationship records and if you need record id in these situations we should use after trigger (in before insert record doesn't contain the record id).
3. For the same event if there are multiple triggers on the object, how to control the order of execution?
We cannot control the order of execution in this situation. It is recommended to have only one trigger per one object.
Note: We can keep the logic of the apex trigger in an apex class and can invoke from that class.
4. What are the recursive triggers and how to avoid?
If we perform update operation on the record in after update event logic recursive triggers will arise.
Using static boolean variable in an apex class (we should not keep static boolean variable inside of the trigger) we can avoid recursive triggers.
Steps:
1.Know the course content.
2. Collect all materials.
3. Separate all materials into A.Admin B.Development C.Project.
4. Get the best trainer and follow him/her.
5. Update your skills with the help of all available resources.
Hello Everyone! This is just an introductory lesson for those who want their career as Salesforce Admin. Being a Salesforce Admin, you do not need any prior experience on CRM. What you all need is the...
A Deployment connection allows customizations to be copied from one organization to another. This list shows the deployment connections allowed from other organizations to this organization, and from this...
Difference between Dataloader and Import Wizard in Salesforce:
Dataloader
Import Wizard
It supports more than 50000 records.
It supports only up to 50000.
It supports...
//Trigger Check Duplicate
before insert, before update
Set leadid = new Set();
Map<String,Lead> phonemap = new Map<String,Lead>();
Map<String,Lead> emailmap = new Map<String,Lead>();...