• Bikash.bhusal
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

I am trying to use the URLFOR to redirect user to a page called Tech_Calendar. I tried setting it as a Visualforce page inside the content source but I do not see the tech_calendar page as one of the options. So, i am trying to make it work using URLFOR. Any help will be greatly appreciated. The code I have right now that's not working is:

 

{!URLFOR($Action.Case.Tech_Calendar, null,
[
title = 'Tech Calendar',
retURL = Opportunity.Id ,
tsk2 = Opportunity.Primary_Contact__c,
tsk5= 'Tech Calendar',
followup=1,
what_id= Opportunity.Id,
who_id= Opportunity.AccountId
])}

I am trying to use the URLFOR to redirect user to a page called Tech_Calendar. I tried setting it as a Visualforce page inside the content source but I do not see the tech_calendar page as one of the options. So, i am trying to make it work using URLFOR. Any help will be greatly appreciated. The code I have right now that's not working is:

 

{!URLFOR($Action.Case.Tech_Calendar, null,
[
title = 'Tech Calendar',
retURL = Opportunity.Id ,
tsk2 = Opportunity.Primary_Contact__c,
tsk5= 'Tech Calendar',
followup=1,
what_id= Opportunity.Id,
who_id= Opportunity.AccountId
])}

I am trying to use the URLFOR to redirect user to a page called Tech_Calendar. I tried setting it as a Visualforce page inside the content source but I do not see the tech_calendar page as one of the options. So, i am trying to make it work using URLFOR. Any help will be greatly appreciated. The code I have right now that's not working is:

 

{!URLFOR($Action.Case.Tech_Calendar, null,
[
title = 'Tech Calendar',
retURL = Opportunity.Id ,
tsk2 = Opportunity.Primary_Contact__c,
tsk5= 'Tech Calendar',
followup=1,
what_id= Opportunity.Id,
who_id= Opportunity.AccountId
])}

Dear Experts,

 

can you help me to write  a test class for the below class. Thanks in Advance. 

trigger UpdateVisitedCheckbox on Visit_Request__c (after insert, after update)
{
 
   
              List<Id> visitReqIds = new List<Id>();
              map< id, contact > contacts = new map< id, contact >();
             Id rtId = [SELECT Id FROM RecordType WHERE Name = 'Student' and SObjectType ='Contact' LIMIT 1].Id;
             Id rtId2 = [SELECT Id FROM RecordType WHERE Name = 'Student (PS)' and SObjectType ='contact' LIMIT 1].Id;
             '+rtid2);

           
          for(Visit_Request__c record:trigger.new)     
            {
                   
                   
                   if(record.Attendance_Status__c == 'Attended' )
                           
                                    
                                 {   
                                  
                                  visitReqIds.add(record.Contact__c);
                                    // contacts.put(record.contact__c, new contact(id=record.contact__c, Visited__c = TRUE));     
                                  }
                           

             }
             List<Contact> contactList = [Select Id, Visited__c, Name From Contact Where Id IN :visitReqIds AND RecordTypeId=:rtId ];
              System.debug('######'+contactList);
              for (Contact c : contactList)
                {
                  c.Visited__c = True;
                }
             update contactList;
                                     
             

 Beat