+ Start a Discussion
anvesh@force.comanvesh@force.com 

How to get __r.id related records from Trigger.new ?

I am unable to get the value from below contact. how we can get the related field data ?

trigger NIGO_update on NIGOs__c(before insert,before update)

     for(NIGOs__c ng:Trigger.new){
     
    NIGOs__c nigo = Trigger.newMap.get(ng.Id);
            if(ng.Product_Type__c != 'Forecare'){
            if(ng.Contact_Name__c != Null){

                ng.External_Wholesaler__c = ng.Contact_Name__r.Annuity_Territory_Wholesaler__r.id; (Here i am getting Null Value)


                

            }
        }
        System.debug('Ext1'+ng.External_Wholesaler__c);
    }
         
}