7

I have a requirement where when I click on a link need to to direct to a visualforce tab. So how to get the VF tab url dynamically using apex code. Thanks in adavance.

  • If a visualforce tab is created for the page abc then even /apex/abc will take you to the visualforce tab only. – Mohith Shrivastava Nov 14 '13 at 10:45
  • 1
    Thanks for your reply Mohith, but my visualforce tab need to get highlighted. – Shebin Mathew Nov 14 '13 at 10:55
  • whats the tab style you have on page? – Mohith Shrivastava Nov 14 '13 at 11:01
10

If a visualforce tab is created for the page "abc" then even "/apex/abc" will take you to the visualforce tab only.

And to highlight particular tab you will use the following code as below

<apex:page controller="abcctrl" tabstyle="tabname__tab" id="ThePage">

The _tab when appended with actual tabname and used in attribute tabstyle of the page the page will be highlighted with visualforce tab

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.