You need to sign in to do that
Don't have an account?
subaa
How to make it default List view?
Hi,
I got a requirement to launch one of the Account list view by default, when Account tab is clicked. I able to redirect to the Account List view using the below visualforce content.
<apex:page action="{!URLFOR($Action.Account.List, $ObjectType.Account)}" />
However, I couldn't control the launch of dedicated List view by default; It shows me the last visited list view instead. I should not delete other Views to launch the expected View by default.
Can anyone help me to control the List view in visualforce page?
Regards,
SuBaa
Hello @Subaa!
To open a certain list view you need to add some params to the url. Your return url must look something like this:
"/objectPrefix?fcf=listViewId&rolodexIndex=-1&page=1"
where objectPrefix is the 3 letter identifier for the object and listViewId corresponds to the list that you want opened.
Example for Accounts: "/001?fcf=00BC0000008SJaA&rolodexIndex=-1&page=1".
You can get the list view id by clicking edit and looking at that url(it will be smth like /ui/list/FilterEditPage?id=00BC0000008SJaA...).
This solution is a hardcoded one, so not very good, but I cannot find another one atm...
Thanks,
Adrian
All Answers
Hello @Subaa!
To open a certain list view you need to add some params to the url. Your return url must look something like this:
"/objectPrefix?fcf=listViewId&rolodexIndex=-1&page=1"
where objectPrefix is the 3 letter identifier for the object and listViewId corresponds to the list that you want opened.
Example for Accounts: "/001?fcf=00BC0000008SJaA&rolodexIndex=-1&page=1".
You can get the list view id by clicking edit and looking at that url(it will be smth like /ui/list/FilterEditPage?id=00BC0000008SJaA...).
This solution is a hardcoded one, so not very good, but I cannot find another one atm...
Thanks,
Adrian
Thanks, Adrian.
It works. I was playing around some List view URLs, and it was seems that URL remains same for two or more list views. Hence, I didn't tried this hard coded approach. Anyway thanks for the hint. Its time to share this solution to my client.
Regards,
SuBaa