• jeba m
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 16
    Replies
Hi please help me to write the test class for the following visualforce page.......Here the field candidate__c is a lookup to a object candidate__c and the field position__c is lookup to the object position__c......

PLEASE PROVIDE ME THE TEST CLASS


public class profileshortlists {

Id id = ApexPages.currentPage().getParameters().get('id');
public List<Profiles_Shortlisting__c> profilelists{get; set;}



public profileshortlists(ApexPages.StandardController controller) {
        profilelists = new List<Profiles_Shortlisting__c>([select name,Candidate__c,Position__c,Candidate_Status__c,resume__c from Profiles_Shortlisting__c where id =: id]);
      
        profilelists.add(new Profiles_Shortlisting__c(name='temp'));
   
   
        }
     public PageReference save() {
  insert profilelists;
  System.PageReference pageReference = new System.PageReference('/a02/o');

   return  PageReference;
   //return new PageReference('/'+id);
  }

}



<apex:page standardController="Profiles_Shortlisting__c" extensions="profileshortlists">
<apex:form >
    <apex:pageBlock title="profile shortlist details" id="thePageBlock" mode="edit">
        <apex:pageBlockButtons >
            <apex:commandButton action="{!save}"  value="Save"></apex:commandButton>
            <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
        </apex:pageBlockButtons>
        <apex:pageBlockSection title="Profile shortlist details" >
       
        <apex:pageblockTable value="{!Profilelists}" var="ps" id="table">
 
        <apex:column headerValue="Candidate">
             <apex:inputfield value="{!ps.Candidate__c}">
            </apex:inputfield>
            </apex:column>
            <apex:column headerValue="Candidate Status">
        <apex:inputfield value="{!ps.Candidate_Status__c}">
            </apex:inputfield>
            </apex:column>
            <apex:column headerValue="Position">
         <apex:inputfield value="{!ps.Position__c}">
            </apex:inputfield> 
         </apex:column>
  
                        </apex:pageblockTable>
            </apex:pageBlockSection>

            </apex:pageblock>
</apex:form>
</apex:page>
  • September 15, 2014
  • Like
  • 0
Hi am new to salesforce please write the test class for the following controller.....

public class profileshortlists {

Id id = ApexPages.currentPage().getParameters().get('id');
public List<Profiles_Shortlisting__c> profilelists{get; set;}



public profileshortlists(ApexPages.StandardController controller) {
        profilelists = new List<Profiles_Shortlisting__c>([select name,Candidate__c,Position__c,Candidate_Status__c,resume__c from Profiles_Shortlisting__c where id =: id]);
       
        profilelists.add(new Profiles_Shortlisting__c(name='temp'));
    
    
        }
     public PageReference save() {
  insert profilelists;
  System.PageReference pageReference = new System.PageReference('/a02/o');
 
   return  PageReference;
   //return new PageReference('/'+id);
  }

}
  • September 12, 2014
  • Like
  • 0
Hi I have a REQUIRED TEXT FIELD in a custom object and two lookup fields.I want these two lookup fields to be concatenated in a "REQUIRED TEXT FIELD called NAME".Please help me to sort out this.........pls
  • September 10, 2014
  • Like
  • 0
I have two fields "X" and "y" both are text fields.And i want these two fields to be concatenated in a required  text field called "name" in an object.Please help me..... 
  • September 09, 2014
  • Like
  • 1
I have two fields "X" and "y" both are text fields.And i want these two fields to be concatenated in a required  text field called "name" in an object.Please help me..... 
  • September 09, 2014
  • Like
  • 1
Hi please help me to write the test class for the following visualforce page.......Here the field candidate__c is a lookup to a object candidate__c and the field position__c is lookup to the object position__c......

PLEASE PROVIDE ME THE TEST CLASS


public class profileshortlists {

Id id = ApexPages.currentPage().getParameters().get('id');
public List<Profiles_Shortlisting__c> profilelists{get; set;}



public profileshortlists(ApexPages.StandardController controller) {
        profilelists = new List<Profiles_Shortlisting__c>([select name,Candidate__c,Position__c,Candidate_Status__c,resume__c from Profiles_Shortlisting__c where id =: id]);
      
        profilelists.add(new Profiles_Shortlisting__c(name='temp'));
   
   
        }
     public PageReference save() {
  insert profilelists;
  System.PageReference pageReference = new System.PageReference('/a02/o');

   return  PageReference;
   //return new PageReference('/'+id);
  }

}



<apex:page standardController="Profiles_Shortlisting__c" extensions="profileshortlists">
<apex:form >
    <apex:pageBlock title="profile shortlist details" id="thePageBlock" mode="edit">
        <apex:pageBlockButtons >
            <apex:commandButton action="{!save}"  value="Save"></apex:commandButton>
            <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
        </apex:pageBlockButtons>
        <apex:pageBlockSection title="Profile shortlist details" >
       
        <apex:pageblockTable value="{!Profilelists}" var="ps" id="table">
 
        <apex:column headerValue="Candidate">
             <apex:inputfield value="{!ps.Candidate__c}">
            </apex:inputfield>
            </apex:column>
            <apex:column headerValue="Candidate Status">
        <apex:inputfield value="{!ps.Candidate_Status__c}">
            </apex:inputfield>
            </apex:column>
            <apex:column headerValue="Position">
         <apex:inputfield value="{!ps.Position__c}">
            </apex:inputfield> 
         </apex:column>
  
                        </apex:pageblockTable>
            </apex:pageBlockSection>

            </apex:pageblock>
</apex:form>
</apex:page>
  • September 15, 2014
  • Like
  • 0
Hi am new to salesforce please write the test class for the following controller.....

public class profileshortlists {

Id id = ApexPages.currentPage().getParameters().get('id');
public List<Profiles_Shortlisting__c> profilelists{get; set;}



public profileshortlists(ApexPages.StandardController controller) {
        profilelists = new List<Profiles_Shortlisting__c>([select name,Candidate__c,Position__c,Candidate_Status__c,resume__c from Profiles_Shortlisting__c where id =: id]);
       
        profilelists.add(new Profiles_Shortlisting__c(name='temp'));
    
    
        }
     public PageReference save() {
  insert profilelists;
  System.PageReference pageReference = new System.PageReference('/a02/o');
 
   return  PageReference;
   //return new PageReference('/'+id);
  }

}
  • September 12, 2014
  • Like
  • 0
I have two fields "X" and "y" both are text fields.And i want these two fields to be concatenated in a required  text field called "name" in an object.Please help me..... 
  • September 09, 2014
  • Like
  • 1