0

I am a new SF Admin that has exhausted search efforts in the standard Help & Training module, someone responded in my thread and referred me to this site.

I have a User who created a custom view. Currently the User goes to the Tab named "Research". He selects from the drop down the custom view he created, the he clicks "Go!" to run it. The User is requesting that the view he created in the Research Tab become his default view so that he does NOT have to click on the Go! button to run it.

Adrian Larson
  • 149,971
  • 38
  • 239
  • 420
MPerez
  • 1
  • 1
  • There are some technical approaches that you could pursue, but if you are a new admin, it seems unlikely to be a reasonable strategy, since you don't have much knowledge of Visualforce nor Apex. – Adrian Larson Feb 27 '17 at 21:14
  • Adrian I figured a developer would be needed to accomplish this. Thanks for responding. – MPerez Feb 27 '17 at 21:32

3 Answers3

1

There is relatively easy solution we are using currently in Classic, borrowed from 'List View Tabs' AppExchange app , - maybe someone would be able to figure out how to make it working in Lightning as well. You can read instructions on how to use it with and Standard or Custom object, and you don't even have to install the app:

  1. Create Visualforce page with the following code:

<apex:page standardController="MyCustom_Object__c" recordSetVar="x" action="{!URLFOR($Action.MyCustom_Object__c.List,$ObjectType.MyCustom_Object__c)}" />

  1. Override Tab settings in the Buttons, Links, and Actions section for your MyCustom_Object__c to use the Visualforce page you just created in 1
  2. Tweak user Profile(s) that can access to MyCustom_Object__c to also have access to the Visualforce page from 1
o-lexi
  • 3,094
  • 14
  • 21
0

Salesforce default Tab view has always infuriated myself and many new users I expect.

I cannot count how many times a user will say i cannot find the record in my view only to find out they were a victim of No Clicking on Go and Recent Items Woos

Anyway, you cannot default the list view for a single user without changing how the entire object / tab is displayed.

You could override the tab with a visualforce page that can get all crazy complicated or stay relatively simple based on the criteria. The page could look up a user default that can be modified by the user and display the appropriate list view when the enter it.

Either way, its too broad for this forum and would require a developer, or your own effort to research and try it out your self. No better time to learn then when you have a problem to solve. Just not sure this problem is worth the investment of your time....

Here is an Idea that may provide a simple solution for you to start from as it would override the default for all users as is

https://success.salesforce.com/ideaView?id=08730000000BroGAAS

Eric
  • 54,152
  • 11
  • 100
  • 195
-1

Another possible solution to 'forcing' the default view selection would be to create a home page component and add it to the home page layout for specific Profiles. You can try the following, as an admin you should be familiar with navigating through the platform and making these changes.

  1. At first, go to the Research tab and select the custom view from the picklist and click Go.
  2. Notice the URL now. Should be something like: https://ap1.salesforce.com/00Q?fcf=00xxxxxxxxxxxxx.
  3. Note fcf=00xxxxxxxxxxxxx is what we need. The 00xxxxxxxxxxxxx is the Id of the Custom List View. Note it down.
  4. Go to Setup > Customize > Home > Home Page Components.
  5. From Custom Component, click New.
  6. Name: Show Custom Research View (Feel free to modify)
  7. Type: HTML Area
  8. Next, choose your Component Position and add the following HTML as given below.

Note: Replace 00xxxxxxxxxxxxx with the Id that you have in your Org i.e., the one you got in Step - 3.

<script>
    (document.getElementsByTagName('h2')[0])
        .parentNode
        .parentNode
        .style.display = 'none';
    if(window.location.pathname=='/00Q/o')
        location.replace('/00Q?fcf=00B90000004gsOu');
</script>
  1. Save.

You now need to edit the layout based on Profile.

  1. Go to Setup > Customize > Home > Home Page Layouts.
  2. We will have to Edit all of those Layouts followed by those Profiles to which your desired Users (those of whom who wants this) actually belong to.
  3. After you click Edit, from the Select Narrow Components to Show section check the option - Show Custom Research View.
  4. Next.
  5. Don't mind the order. Leave it as it is and click Save.

Lets talk a little about what the script is doing.

Everything before if(window.location.pathname=='/00Q/o') is making sure that the component is hidden. The conditional check will then make sure that only when on the Research tab to use this custom view.

Hope this helps.

TSmith
  • 5,002
  • 1
  • 12
  • 30
  • This no longer works as javascript in home page components was nerfed long ago and aside from that, it is not for a specific user – Eric Feb 27 '17 at 22:50
  • End of javascript sidebar workarounds - http://salesforce.stackexchange.com/questions/38918/end-of-javascript-sidebar-workarounds – Eric Feb 27 '17 at 22:57
  • Thanks @Eric I find it very strange that my testing for this has been successful in a Spring 17 environment. I have a custom object which has a single view, 'All'. After creating a custom view I modified the home page component to redirect to this view. Upon refresh, my custom view is displayed and not the 'All' view. – TSmith Feb 27 '17 at 23:02
  • No idea.....It should not work though unless I am missing something. This started back in Summer '15 so....Apologies that I cannot retract the downvote (since you tested it I tried) but I do not feel I can upvote unless someone else can confirm it is appropriate to use. If they do I will certainly upvote – Eric Feb 27 '17 at 23:05
  • 2
    The script should just get escaped...please post some screenshots as proof. I too find it hard to believe you are able to create such a component as it was a high priority security flaw. – Adrian Larson Feb 28 '17 at 05:02