How can I add a link to the sidebar component that opens a VF page in a new page? I have created a custom page component and a custom link like apex/myPageName but it does not work.
-
I guess it should be /apex/pagename .Please recheck your URL link. – Mohith Shrivastava Dec 4 '12 at 13:20
When creating your Link you can pick the Visualforce page source like so...
Then assign the Link to a component...
And finally to the layout...
My page shows in the sidebar like so and popups up in a new window...
Like so...
My page source is this, note I've removed the sidebar and header...
<apex:page sidebar="false" showHeader="false" >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page shown via the Sidebar
<!-- End Default Content REMOVE THIS -->
</apex:page>
-
Is there any way to have multiple options under "My Sidebar Pages", which in turn do different things when clicked based on the contents of your VF page? Or do I have to create a separate VF page for each link? – JWiley Mar 4 '16 at 17:02
Specify your full URL (eg https://na1.salesforce.com/apex/pagename) for the link.
It's nice to put that prefix in a custom setting so it'll work in sandboxes, after a move, etc.
And as always, verify permissions on the page.
-
It's even nicer to specify the prefix without the hardcoded instance ;) Relative url like "/apex/pagename" ;) – eyescream Dec 4 '12 at 13:16
-