In my org Lead
is Child and a custom object (Intake__c
) is parent. This custom object have 2 picklist fields called Intake_Month
and Intake_Year
. Now in trigger i am trying to access these 2 picklist fields and put them in 2 same picklist fields on Lead.
Part of My Trigger:
if(Trigger.isBefore && (Trigger.isInsert || Trigger.isUpdate)){
if(ld.Intake__c != Null){
ld.Intake_Month__c = ld.Intake__r.Intake_Month__c;
ld.Intake_Year__c = ld.Intake__r.Intake_Year__c;
}else{
ld.Intake_Month__c = Null;
ld.Intake_Year__c = Null;
}
}
But both picklists on Lead
are Null
. Any suggestions?
Intake__c
related like this: salesforce.stackexchange.com/questions/53548/…