function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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;