You need to sign in to do that
Don't have an account?
AKASH KUMAR 82
how to check whether my page reference code is working in custom object(Position) or not
This is my apex code how to check in Position object it is working or not.I just want to check after clicking new it must go to IT record type or Non IT Record type
public class c1{
List <Position__c> pstn = new List<Position__c>();
public List<Position__c> getpstn(){
return pstn;
}
public PageReference ITReport_pstn(){
pstn = [select Name__c ,Type__c, Industry__c, Phone__c from Position__c where Type__c = 'IT Report'];
return null;
}
public PageReference NonITReport_pstn(){
pstn = [select Name__c , Type__c, Industry__c,Phone__c from Position__c where Type__c = 'NonIT Report'];
return null;
}
}
public class c1{
List <Position__c> pstn = new List<Position__c>();
public List<Position__c> getpstn(){
return pstn;
}
public PageReference ITReport_pstn(){
pstn = [select Name__c ,Type__c, Industry__c, Phone__c from Position__c where Type__c = 'IT Report'];
return null;
}
public PageReference NonITReport_pstn(){
pstn = [select Name__c , Type__c, Industry__c,Phone__c from Position__c where Type__c = 'NonIT Report'];
return null;
}
}
Make a visual force page like above-replacing content according to yours, link the present custom controller to it.
Then go to position object and override the new button, you would have created with the above visual force page.
Regards:
Arpit Gupta
Thanx for ur reply i have created a visual force page just tell me how to override the new button?