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
shabuthomas74shabuthomas74 

How to get the id of a visualforce tab using Apex code

When I click a visual force tab under Custom tab section, the url of the current page will be

like https://na6.salesforce.com/01r8000000094jB where 01r8000000094jB is the ID of the tab. How can I get it from Apex Code?

 

Thnx in advance 

magdielhfmagdielhf

You should use the context sObject you are working with,

 

for example, I'm using a YUI lightbox  that fires from an custom button placed inside an opportunity schema and load some visual force page containing a wizard implemented in FLEX, they need the opportunity ID and the session ID the only thing i had to do was send that values as query string to my visual force page and after to FLEX

 

something like this

 

https://n22.visual.force.com/apex/WizardPage?SessionId={!$Api.Session_ID}&AccountId={!Opportunity.AccountId} 

 

more information here

 

http://community.salesforce.com/sforce/board/message?board.id=practices&thread.id=10315 

 

hope this help you,

Regards 

RayKrrkRayKrrk

hi, I m having same scenario to access the id of VF tab using apex.can u please suggest any solution for that.?

ramesh kopparapu 15ramesh kopparapu 15
Hi RayKrrk,

I am also having same scenario, like i need to fetch the Visualforce Tab id in apex.
Do you have any solution?