Skip to main content
Hi

I have parent object is called database and child object is called Task both are custom objects.on Task i am having lookup field called database name,i am having type is pick list field  and group field is look up with public group both objects.when evere i  create record on task object with databaname field, i want to update Type field and group field on task record same as database values

i wrote this below trigger it's excuted but trigger not fire.

trigger updatedatabasedatainTamplateTask on HLEP_Template_Task__c (after update) {

        set<id> dataids = New set<id>();

        

        for(HLEP_Template_Task__c TT:Trigger.new){

             

             dataids.add(TT.Database_Application_Name__c);

             }

             

           List<HLEP_Template_Task__c > Hlep = [Select id,Database_Application_Name__c,Database_Application_Type__c,Database_Application_Name__r.Xenoncore__Database_Application_Type__c,Sponsoring_group__c From HLEP_Template_Task__c Where id in:dataids];    

            list<HLEP_Template_Task__c > Hleptask = new list <HLEP_Template_Task__c >();

           for(HLEP_Template_Task__c TTu:Hlep ){ 

             

               TTu.Xenoncore__Database_Application_Type__c=TTu.Database_Application_Name__r.Xenoncore__Database_Application_Type__c;

               

               Hleptask.add(TTu); 

               }

               update Hleptask;

}

Plz help me------------

thanks

NR

 
1 resposta
0/9000