You need to sign in to do that
Don't have an account?
Nivedita Shukla 3
Update terriority custom field of opportunity when lead is converted based on lead city ,state and country
Below is the trigger written for the same .
I'm stuck to get terriority based on field . how can i achieve this?
trigger trigMapFields on Lead (after Update) {
TriggerHelper.createOpportunity(trigger.new);
}
createOpportunity(List listList){ List oUpdList = new List (); for(Lead lead: LeadList){ if (lead.IsConverted && lead.convertedOpportunityId != null){ //How to get terriority based on city state and country Opportunity opp=new Opportunity(id = lead.convertedOpportunityId, terriority__c =:terriority oUpdList.add(opp); } } update oUpdList ; }
any help would be appriciated!
I'm stuck to get terriority based on field . how can i achieve this?
trigger trigMapFields on Lead (after Update) {
TriggerHelper.createOpportunity(trigger.new);
}
createOpportunity(List listList){ List oUpdList = new List (); for(Lead lead: LeadList){ if (lead.IsConverted && lead.convertedOpportunityId != null){ //How to get terriority based on city state and country Opportunity opp=new Opportunity(id = lead.convertedOpportunityId, terriority__c =:terriority oUpdList.add(opp); } } update oUpdList ; }
any help would be appriciated!
Try this code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi