You need to sign in to do that
Don't have an account?
Avinash dhanke 24
one lookup filed in my lead object i want to populated this lookup filed in text field in same object. i will write the handler for that below is my code
public static void populatedLookup(Lead leadobj1){
Id recordTypeId1 = Schema.Sobjecttype.Lead.getRecordTypeInfosByName().get('IM-Onboarding').getRecordTypeId();
Id recordTypeId2 = Schema.Sobjecttype.Lead.getRecordTypeInfosByName().get('IM Onboarding-QDE').getRecordTypeId();
List<Lead> leadList=[Select Id,FirstName,LastName,PAN__c,Stage__c,Status,Client_Type__c,Channel_Partner__c,Channel__c,RecordType.Name FROM Lead Where
(RecordType.Name=:recordTypeId1 OR RecordType.Name =:recordTypeId1) And Id =:leadObj1.id];
For(lead leadObj:leadList){
if(leadObj.Channel_Partner__c!=null){
leadObj.Channel_Partner__c=leadObj.Channel__c;
}
}
}
Id recordTypeId1 = Schema.Sobjecttype.Lead.getRecordTypeInfosByName().get('IM-Onboarding').getRecordTypeId();
Id recordTypeId2 = Schema.Sobjecttype.Lead.getRecordTypeInfosByName().get('IM Onboarding-QDE').getRecordTypeId();
List<Lead> leadList=[Select Id,FirstName,LastName,PAN__c,Stage__c,Status,Client_Type__c,Channel_Partner__c,Channel__c,RecordType.Name FROM Lead Where
(RecordType.Name=:recordTypeId1 OR RecordType.Name =:recordTypeId1) And Id =:leadObj1.id];
For(lead leadObj:leadList){
if(leadObj.Channel_Partner__c!=null){
leadObj.Channel_Partner__c=leadObj.Channel__c;
}
}
}