Call VF Page via Custom Button?

  • 4
  • Question
  • Updated 5 years ago
  • Answered
Can I call a Visualforce page from a custom Skuid button?

I currently have an action button on the account object that calls a VF page ("/apex/MyVFPage?ID=ID"). Can I replicate that behavior using a custom skuid button?
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb

Posted 5 years ago

  • 4
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
Anyone?
Photo of John Nelson

John Nelson, Product Manager

  • 3,234 Points 3k badge 2x thumb
Sorry, Peter. Been in some pretty awesome meetings all day.

You can absolutely call a VF Page from a button. What you want to do is create a new Page Title Action (button) that's a redirect type action. Then just put in the relative url like you have in your SF button.
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
Thanks John!
Photo of Jonathan Adlerstein

Jonathan Adlerstein

  • 528 Points 500 badge 2x thumb
I tried this and the button redirected the browser to:

https://skuid.cs7.visual.force.com/ap...

which returns a "URL No Longer Exists" error. The correct address is:

https://c.cs7.visual.force.com/apex/V...

(without the skuid subdomain). How can I make this work without hard-coding the whole address (which would limit my pages to the instance they are developed within rather than making them dynamic across sandbox/production environments)?
Photo of John Nelson

John Nelson, Product Manager

  • 3,234 Points 3k badge 2x thumb
The key to doing this is to prepend the namespace to your Visualforce page's name and it will force it into the correct namespace: "/apex/c__VFPage"