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
DrawloopSupportDrawloopSupport 

URLFOR Custom Visualforce Tab

Let's say you have a Visualforce tab called Sample_Tab that references some Visualforce page. How would one construct a URLFOR function for this tab? I have tried at least the following:

 

 

{!URLFOR(Sample_Tab)}
{!URLFOR($Action.Tab.Sample_Tab)}
{!URLFOR($Action.Sample_Tab)}
{!URLFOR($Tab.Sample_Tab)}
{!URLFOR($Component.Sample_Tab)}

 

Thanks!

 

mtbclimbermtbclimber

So there isn't a way to reference the page "as a tab" so to speak. You can reference the page, however. So say your page named "Sample_Page", the syntax is:

 

 

<apex:page >
    <apex:outputLink value="{!URLFOR($Page.sample_page)}">Sample Page</apex:outputLink> 
</apex:page>

 

 

Now to get your page to show up "as a tab" you need to modify your sample page to declare it's intended to be shown under a specific tab. Using your tab name you'd need your sample page to look something like this:

 

 

<apex:page tabStyle="Sample_Tab__tab">
    Tab Content
</apex:page>

 

 

DrawloopSupportDrawloopSupport

I can see how that would work in most cases, but, unfortunately, it won't work in our case. I will probably just have to add it to the Idea Exchange...

 

Thanks.

mtbclimbermtbclimber

Why will that not work?  Does your page need to be displayed under many different tabs?  Please cross-reference your idea to this post. 

 

Thanks,

Andrew

DrawloopSupportDrawloopSupport

Yes, the Visualforce page needs to display as different tab styles.

 

Thanks.

mtbclimbermtbclimber

Sorry there isn't a working solution yet. Please do cross reference the idea from this thread so others who come across this can support it.