+ Start a Discussion
Abc234Abc234 

How to redirect custom object edit page when I click on button in VF page

Hi All,

 

I have 2 custom objects called Login_page__c and Candidate__c

 

when I click  on Newuser button in Login_page__c that is created in if page, then it should redirected to Candidate edit page for creating new candidate 

 

Thanks & Regards,

Bharath

Best Answer chosen by Admin (Salesforce Developers) 
Suresh RaghuramSuresh Raghuram

in the newuserbuttonmethod  code

 

PageReference pg=new PageReference('/ur desired page ID');

pg.setRedirect(true);

return pg;