0

Have a business requirement for 2 Lightning Service Consoles (apps), one for each business line (professional and consumer). Each business line has it's own service department, though a handful of service reps will work both business lines.

Cases, Contacts and Accounts have record types specific to each business line.

We want to restrict list views so that the the professional console only displays list views that represent professional record types, likewise for consumer. Professional service reps should never see list views for consumer records in the Professional Lightning Console. And consumer service reps should never see list views for professional records in the Consumer Lightning Console.

I understand that VisualForce list views are not available in the Lightning console.

Could a custom Lightning Component be created to meet this requirement? Or is there another solution?

Thanks.

1
  • Well, custom lightning component can be created but I am thinking how can we design it in such a way that it is configurable to much extent. Commented Apr 9, 2018 at 18:06

2 Answers 2

1

While you cannot do it out of the box, but creating a Lightning Component (that can be reused) and utilizing it to render the appropriate list view can be a solution option. Consider using lightning:listView in conjunction with lightning:select as a possible implementation approach as below:

<aura:attribute name="listViewName" type="String" default="AllAccounts" />
<lightning:select name="selectItem" label="Select an item" onchange="{!c.updateListViewName}">
<lightning:listView aura:id="listViewAccounts" objectApiName="Account" 
 listName="{!v.listViewName}"
 rows="5"
 showActionBar="false"
 enableInlineEdit="true"
 showRowLevelActions="false"
/>

Now utilizing init handler, everytime your component loads, you can always fetch the information of the current running application and based on that you can populate the select dropdown with the values of the list views as applicable.

And with every change on the lightning select, you can update the listViewName attribute to display the appropriate record set.

2
  • Thanks, Jayant, this pointed me in the right direction. I created the Lightning component using lightning:listView and set it as an override on the Account Tab. Commented Apr 10, 2018 at 3:22
  • Glad that it worked for you.
    – Jayant Das
    Commented Apr 10, 2018 at 23:53
0

Jayant, here is the code I used, based on the link you provided for lightning:listView:

<aura:component implements="flexipage:availableForAllPageTypes,lightning:actionOverride" >
<lightning:listView aura:id="listViewAccounts" 
 objectApiName="Account"
 listName="CRM_Accounts"
 rows="10"
 showActionBar="false"
 enableInlineEdit="true"
 showRowLevelActions="false"
/>
</aura:component>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .