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
robertcw777robertcw777 

New Custom Object from VisualForce Page

I have a custom object called Displine__c. I want to create a VF page that has a New button that will open the new record page for this object, and then rerender the page (there is a tableblock below that should be refreshed to show the new record). I couldn't find any way to do this. Help?

Best Answer chosen by Admin (Salesforce Developers) 
robertcw777robertcw777

Thanks!

All Answers

sivaextsivaext

Hi

 

try this 

 

inside action method of button  write small code

 

PageReference  pg= new pageReference('copt the url of new page of custom object');

pg.setRedirect(true);

return null; (inplace of null give me path where you return of save);

 

 

robertcw777robertcw777

Thanks!

This was selected as the best answer