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
Micky MMicky M 

New Object From a button

Hey all, does anyone know how to create a new object from a button? i have a VF page with a button and i need to click the button then see the custom objects page layout in edit mode ... does that make sense? but im a but stuck how to do it, would i need to created the object insert it and then redirect the user or is there a nicer way to do it?

 

Cheers All

 

Best Answer chosen by Admin (Salesforce Developers) 
raseshtcsraseshtcs

Try redirecting the user to the following link on click of the button

'/01I/e?setupid=CustomObjects'

All Answers

raseshtcsraseshtcs

Try redirecting the user to the following link on click of the button

'/01I/e?setupid=CustomObjects'

This was selected as the best answer
Micky MMicky M

Thats it cheers mate had to slightly modify it to /a0e/e?setupid=Project_Activity__c but thx!

raseshtcsraseshtcs

Your Welcome... but I think u ll have to take care of this while you are deploying the same to production/other environment as the id could be different