• harish reddy 39
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
In my organization we have so many classes ,I am not able to map approiate test class with actual class as their naming convention is different of that of class .
is there any way to find out plz help me.
Thanks in advance for ur help.
can we have one vf page for different recordtype,if so how to differentiate fields and picklist values.
I have three picklist values picklist1,picklist2,picklist3 all picklist containing values 1-10, based on these picklist values in have to highlight a section of a VF.I am trying to add picklist values so that values so that I can use them as standard for each section of VF page when combination falls in any one of the standard it should highlight that perticular section.
i am trying but couldn't get it done.can some one help me with that.
Thanks in advance.
I have two master objects ( positions__c ,Candidates__c) and junction object jobapplications__C ,now there is field on positions__C called noofcandidates__c which should be updated with no of  candidates for each position.
I have tried it my functionality not working can some help me.

Code:

trigger noofcandidatestrigger1 on Candidates__c (After insert,After Update,After Delete)
{    List<id> Ids = New List<id>();
     List<positions__c> pos1 = new List<positions__c>();
    If(Trigger.IsInsert)
    {
     for(Candidates__c con: Trigger.New)
     {
          Ids.add(con.id);   
     }
    }
 
     If(Trigger.IsUpdate || Trigger.IsDelete)
     {
        for(Candidates__c con: Trigger.old)
        {
            Ids.add(con.id);
        }
     }
 List<positions__c> pos = [Select id,Noofcandidates__c from positions__c where id in: ids];
 List<Job_Applications__c> job = [Select id,Status__c from Job_Applications__c where id in :ids];
 
 for(positions__c positi : pos)     
   {
     positi.Noofcandidates__c = job.size(); 
       pos1.add(positi);
   }
    update pos1;
}
Hi,
    I have 2 Custom objects(Reservations__c And HotelGusts__c) both objects have custom fields Email__c  and have lookup from reservationsc to Hotelguests__c .Now i need to write a trigger which updates Reservations__c's Email Field with hotelguests__c's Email Field.Can any one help me with that.
Thanks in Advance.

My trigger Code:
trigger UpdateemailTrigger on Reservations__c (After insert) {

         Reservations__c  resv = New Reservations__c (); 
List<Id> ids = New List<Id>();
         for (Reservations__c hrs:trigger.new)
            {
                 ids.add(hrs.HotelGuest__c);
            }
            
            List<Reservations__c>  Revs1 = [Select Id ,Email__c from Reservations__c Where Id IN : ids];
         HotelGuest__c Gust1 = New HotelGuest__c();
       for (Reservations__c hrs:Revs1 )
         {
            
     
            hrs.Email__c = Gust1.Email__c;
             
          Update Revs1 ;
         }     
      
trigger customtrigger on customobj1__c (after insert) {
customobj2__c cus2=new customobj2__c();

for(customobj1__c cus:trigger.new)
{
   if(cus.field1__c=='1' && cus.field2__c=='1')
   {
      cus2.updatefield__c='a';
   }
   else if(cus.field1__c=='2' && cus.field2__c=='2')
   {
       cus2.updatefield__c='b';
       }
    else if(cus.field1__c=='3' && cus.field2__c=='3')
    {
        cus2.updatefield__c='c';
        }
        
}
   insert cus2;
 
problem here is how to get picklistvalues from obj2..and how to update picklist value in customobj2..?
 
I have three picklist values picklist1,picklist2,picklist3 all picklist containing values 1-10, based on these picklist values in have to highlight a section of a VF.I am trying to add picklist values so that values so that I can use them as standard for each section of VF page when combination falls in any one of the standard it should highlight that perticular section.
i am trying but couldn't get it done.can some one help me with that.
Thanks in advance.
I have two master objects ( positions__c ,Candidates__c) and junction object jobapplications__C ,now there is field on positions__C called noofcandidates__c which should be updated with no of  candidates for each position.
I have tried it my functionality not working can some help me.

Code:

trigger noofcandidatestrigger1 on Candidates__c (After insert,After Update,After Delete)
{    List<id> Ids = New List<id>();
     List<positions__c> pos1 = new List<positions__c>();
    If(Trigger.IsInsert)
    {
     for(Candidates__c con: Trigger.New)
     {
          Ids.add(con.id);   
     }
    }
 
     If(Trigger.IsUpdate || Trigger.IsDelete)
     {
        for(Candidates__c con: Trigger.old)
        {
            Ids.add(con.id);
        }
     }
 List<positions__c> pos = [Select id,Noofcandidates__c from positions__c where id in: ids];
 List<Job_Applications__c> job = [Select id,Status__c from Job_Applications__c where id in :ids];
 
 for(positions__c positi : pos)     
   {
     positi.Noofcandidates__c = job.size(); 
       pos1.add(positi);
   }
    update pos1;
}
Hi,
    I have 2 Custom objects(Reservations__c And HotelGusts__c) both objects have custom fields Email__c  and have lookup from reservationsc to Hotelguests__c .Now i need to write a trigger which updates Reservations__c's Email Field with hotelguests__c's Email Field.Can any one help me with that.
Thanks in Advance.

My trigger Code:
trigger UpdateemailTrigger on Reservations__c (After insert) {

         Reservations__c  resv = New Reservations__c (); 
List<Id> ids = New List<Id>();
         for (Reservations__c hrs:trigger.new)
            {
                 ids.add(hrs.HotelGuest__c);
            }
            
            List<Reservations__c>  Revs1 = [Select Id ,Email__c from Reservations__c Where Id IN : ids];
         HotelGuest__c Gust1 = New HotelGuest__c();
       for (Reservations__c hrs:Revs1 )
         {
            
     
            hrs.Email__c = Gust1.Email__c;
             
          Update Revs1 ;
         }