+ Start a Discussion
Shwetal DesaiShwetal Desai 

Use of {!URLFOR(!Action.<CustomObject__c.Tab>)}

How to retrieve url for Tab page of Custom Object?
I have used:

Departments

but its not working.
Best Answer chosen by Admin (Salesforce Developers) 
Shwetal DesaiShwetal Desai

Thanks Rajesh,

got the answer

 

its {!URLFOR($Action.<CustomObject__c>.Tab,$ObjectType.<CustomObject__c>)} 

Message Edited by Shwetal Desai on 07-13-2009 03:45 AM

All Answers

wesnoltewesnolte

Hey

 

Try this

 

{!URLFOR($Action.CustomObject__c.Tab)} 

 

Cheers,

Wes 

Shwetal DesaiShwetal Desai

Thanks for the reply wes,I tried that first but its not working giving me the visual force error message:

 

"Invalid parameter for function URLFOR"

 

please guide

 

Shwetal, 

Rajesh ShahRajesh Shah

You can try <Action>.Custom_Object__tab. For eg. if the custom object Test, it will be <Action>.Test__tab.

 

I am not sure if this will work. This atleast works when you want a tabstyle of a tab so just guessing that it will work here.

Shwetal DesaiShwetal Desai
Thanks for the reply Rajesh, but its also not working

any other solution ??
Rajesh ShahRajesh Shah

I foundthe following in the help:


When you override the tab home page for a standard or custom tab, set target to the "Tab" $Action global variable and id to the object type. For example,

URLFOR($Action.Account.Tab, $ObjectType.Account)

 

 I think you also have to pass the type of Object in the second parameter. Let me know if this works

Shwetal DesaiShwetal Desai

Thanks Rajesh,

got the answer

 

its {!URLFOR($Action.<CustomObject__c>.Tab,$ObjectType.<CustomObject__c>)} 

Message Edited by Shwetal Desai on 07-13-2009 03:45 AM
This was selected as the best answer