Deployments by using change sets

Use change sets to send customizations from sandbox to sandbox/production . For example, you can create and test a new object in a sandbox org, then send it to your production org using a change set. Change sets can only contain modifications you can make through the Setup menu. For example, you can’t use a [...]

Advertisements

Avoid recursive trigger in salesforce using static variable

Avoid recursive trigger in salesforce using static variable Avoid recursive trigger in salesforce using static variable Recursion occurs when same code is executed again and again. It can lead to infinite loop and which can result to governor limit sometime. Sometime it can also result in unexpected output. It is very common to have recursion [...]

Trigger for Auto Converting Leads

Trigger for Auto Converting Leads Requirement:- Webform__c is custom text field  on lead . And Whenever new lead is created with Webform__c=='free trail' then lead should be converted autmatically trigger AutoLeadConvert on Lead (after insert) { leadStatus convertStatus =[SELECT MasterLabel FROM LeadStatus WHERE isConverted = true Limit 1];  List<Database.LeadConvert> leadConverts = new List<Database.LeadConvert>();  for(lead lead:Trigger.new){    [...]

Lead Conversion Trigger Order of Execution

Lead Conversion Trigger Order of Execution On conversion of Lead following is the order of execution of triggers of Account, Opportunity, Contact and Lead: 1) Account Before Trigger 2) Account After Trigger 3) Opportunity Before Trigger 4) Opportunity After Trigger 5) Contact Before Trigger 6) Contact After Trigger 7) Lead Before Trigger 8) Lead After [...]

Roll Up Summary Triggers on LookUp Relationship

Generally we can create rollup summary fields in between Master_Detail relationship. if we want to create roll up summary  fields in between look up relation we need to  write a trigger. Requirement :- Custom field On contact :Salary__C Custom field on Account :Total_salary__C Count the sum of  salaries of contact with same AccountId  and the sum [...]