1

I have a custom Object and have created a tab that displays the rows of the object. However, when I make a new view, only one column is diplayed by default. I can go in and add more columns, but I would like there to be a default set of columns for any new view created on this tab. I tried adding columns to the "Search Layouts" section of the custom object, but it seemed to have no effect, and this doesn't really have to do with search anyway.

Sorry if this has been asked before - I searched but am new to Salesforce and don't know the right terminology..

Thanks!

Edit: Requested screenshot: http://imgur.com/w9pAFxC You can see here there is just one column in the list by default, but there are many other columns that I would like to add to this list view, and when someone adds a new list view, I'd like them to have a set of default columns and not have to add ones that will likely appear on every view.

  • please share a screen shot -- you may be referring to the search layout called customObjectXXX Tab where you can define the columns shown when the tab is clicked. However, to get all list views to use the same columns by default is not supported AFAIK – cropredy Mar 18 '17 at 5:53
0

Based on the screenshot, it looks like the fields on that page are controlled by the customTabListAdditionalFields on the searchLayouts subcomponent of the custom object metadata.

When you create or modify a custom object through a metadata api deployment, you can set those values:

<searchLayouts>
    <customTabListAdditionalFields>CREATEDBY_USER</customTabListAdditionalFields>
    <customTabListAdditionalFields>CustomField__c</customTabListAdditionalFields>
</searchLayouts>

If you need to make a lot of similar list views, it can sometimes be most efficient to use a metadata api deployment and work with the list views as text.

If you want to do it in the ui, or the list views need to have restricted visibility, you could hit Edit on the list view that most resembles the list view you want to make.

enter image description here

Then change the name of the list view, make the other changes, and hit Save As:

enter image description here


It looks like list view creation works differently in Lex. All I see is a button to create a new list view, and there doesn't seem to be a way to "save as" like you can in salesforce classic. Your best bet would probably be to switch back to classic or use the metadata api for this.

enter image description here

  • I've changed all of the layouts in the Search Layout section for the custom object (Tab, Search Results, Lookup Dialogs, Lookup Phone Dialogs) but when I create a new list view, it only has one tab by default. Do I really have to write code to do this? – skaz Mar 22 '17 at 9:10
  • I don't see "edit" for the list views, just what is shown in the screenshot above. – skaz Apr 19 '17 at 12:45

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.