+ Start a Discussion

How to return Tab or View page Id

Hi There
I had a tab, created from a custom object, the url is like:
the a07 is the tab ID, how can i return this value(a07) from code?
Thanks in advance
Ron HessRon Hess
i think you would use URLFOR and $ObjectType.custom__c

Also, look at using $Action.custom__c.Tab

these are documented in the online help , search for Understanding Global Variables
If you want to redirect in an S-control to the custom tab for that particular custom object, you can do it with something like this:

this.parent.location.href= "{!URLFOR($Action.MyCustomObject__c.Tab, $ObjectType.MyCustomObject__c)}";

If someone had pointed out how to do this earlier, it would have saved about half of my day today. :-/

thanks Ron, how do i rewrite it in controller?

Message Edited by Feng on 05-20-2008 02:48 PM