+ Start a Discussion

How to get a custom tab id

Hi all,
         I am trying to get the id of a custom tab created by a package installation. I haev created a package that can be installed in any salesforce insatnce. It will install a button on opportunity and the buttom have a s-control that will redirct the page to a custom object tab. I need to make the url for the custom tab in s-control executed on opportunities button. The url might be like "https://na5.salesforce.com/a01/o" the number "a01" is the id of that custom tab or that custom object. But this id will be different on every salesforce instance in which my package will be installed. Is there any way to get this Id (" a01 ") in s-control that waht id is generated for the custom object tab on installation by salesforce.
Need urgent help.

Thanks in advance.
Use the $Object global variable to obtain the 3-character ID, or you can use the $Action global variable to obtain a specific function for an object. Examples:



Just put in the name of your custom object instead of "Account" and you'll achieve the same effect for your custom object-- it'll be "patched" to match the name in the installed organization.
I read this post and tried using {!UrlFor($Action.my Custom Tab.New,null,null)} and of course this does not work.  I created a new posting (see above) as I suspect my issue is a bit different, although I too am looking for a way to get the URL for a custom tab.