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
Simon234Simon234 

Custom Button that links to the Visualforce Page

I need to create a Button for the Page Layout that links to the Visualforce Page (another page). It's for custom object. How can I do that? Can I use "Buttons, Links, and Actions" to open VF Page? Or I need to create another VF Page?
Best Answer chosen by Simon234
Raj VakatiRaj Vakati
You can create a on click javascripy button that will redirect to the another vf page 
 
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} 
var accReq = "{!Account.Name}";
if(accReq != '') {
window.location="/apex/VisualforceName?id={!Account.Id}";
}
else {
alert('Name is mandatory');
window.location.reload(); 
}