You need to sign in to do that
Don't have an account?
raghavi SR
Contact API name during lead conversion and status
Hi,
When we convert lead we get to see Account,Contact and opportunity before final conversion.
I have to check if the contact names are interchnaged during conversion(CONTACT FIRST NAME,CONTACT LAST NAME)
trigger LeadWarning on Lead (before update)
{
for (Lead l:trigger.new)
{
if (l.IsConverted && trigger.oldMap.get(l.Id).IsConverted == false &&
trigger.oldMap.get(l.Id).CONTACT FIRST NAME==trigger.newMap.get(l.Id).CONTACT LAST NAME &&
trigger.oldMap.get(l.Id).CONTACT LAST NAME==trigger.newMap.get(l.Id).CONTACT FIRST NAME)
{
Trigger.new[0].addError(' error msg ');
}
}
}
How to map the contact API names to lead.
When we convert lead we get to see Account,Contact and opportunity before final conversion.
I have to check if the contact names are interchnaged during conversion(CONTACT FIRST NAME,CONTACT LAST NAME)
trigger LeadWarning on Lead (before update)
{
for (Lead l:trigger.new)
{
if (l.IsConverted && trigger.oldMap.get(l.Id).IsConverted == false &&
trigger.oldMap.get(l.Id).CONTACT FIRST NAME==trigger.newMap.get(l.Id).CONTACT LAST NAME &&
trigger.oldMap.get(l.Id).CONTACT LAST NAME==trigger.newMap.get(l.Id).CONTACT FIRST NAME)
{
Trigger.new[0].addError(' error msg ');
}
}
}
How to map the contact API names to lead.
You can make use of below link, to know the converted contact , account information and from contact you can check First Name vs Last Name
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_lead.htm
Thank You,
Rajesh Adiga P.