4

I have been working over replicating the account home tab page in visualforce.

The issue is i am unable to understand how the hotlist_mode works.

The case is : in general home page here enter image description here

When i change the hotlist option to Recently Created the page reloads and URL query-string changes to ?hotlist_mode=2. For the next time when i visit the page again, the list has Recently Created selected.

Same for the link Show 25 items if i click on it, the Recent Accounts section shows 25 records and the link changes to Show 10 items. Again if i visit the page randomly from nowhere, the Recent Accounts section still shows 25 records.

What is happening here? Are the values stored somewhere in the back-end?

1 Answer 1

0

I cannot guarantee how Salesforce handles this, but if I develop this I would;

  1. Create an object which stores user's last action

    Object: User_Preference
    {
    Column: User (lookup User),
    Column: Object (Object Api Name),
    Column: Feature (Picklist with values: 'Landing_Page_Pref','Listview_Pref' etc..),
    Column: Value (Text)
    }

  2. When user hits the default url, check his Landing_Page_Pref value for the user on Account object from the above table and display that

  3. If no last preference is found, display a default value, may be 'Recently Viewed' in this case

  4. When user changes the picklist value, update it to the User_Preference object

Salesforce might be handling the same using some internal JS, so first time it shows your last searched value and when you change picklist value it reads it from the URL and shows the result. But this is my opinion and may not be how salesforce would be doing it.

If you notice the listviews, you will see the last listview you looked into will be by default selected when you land on the object tab and similar for the sorted field on each listview, column widths and LRU on the recent items in the side bar.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.