Apex trigger to add dr. Salutation on lead record. - Salesforce
Handler class:
public class LeadsTriggerHandler {
public static void createLead(List<Lead> lstLead)
{
for( Lead ldcreate: lstLead)
{
if( ldcreate.Is_Doctor__c == True)
{
ldcreate.Salutation = 'Dr.';
}
}
}
}
trigger LeadsTrigger on Lead (before insert , before update) {
LeadsTriggerHandler.createLead(Trigger.new);
}
public class LeadsTriggerHandler {
public static void createLead(List<Lead> lstLead)
{
for( Lead ldcreate: lstLead)
{
if( ldcreate.Is_Doctor__c == True)
{
ldcreate.Salutation = 'Dr.';
}
}
}
}
Trigger:
trigger LeadsTrigger on Lead (before insert , before update) {
LeadsTriggerHandler.createLead(Trigger.new);
}
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment