if Lead status = closed and reason = "somthing". after saving the record it should take me to create a new opportunity.
Is it possible with trigger or process builder ?
if Lead status = closed and reason = "somthing". after saving the record it should take me to create a new opportunity.
Is it possible with trigger or process builder ?
Yes this is possible. Here is the code :
trigger toOppo on Lead (after update) {
list<lead> l = trigger.new;
for(lead l1:l){
if((l1.status=='Closed - Converted') && (l1.reason!=' ')){
opportunity o = new opportunity();
o.Name=l1.Name;
o.closeDate=date.today();
o.StageName='Prospecting';
insert o;
}
}
}