2

I have an app page that needs to display records from a particular list view. I have created a simple component using lightning:listview component.

I am able to use this to display a custom list view for a managed package object. But when I try to display a managed package list view for the same managed package object I get a message "The list view you requested was deleted, or you don't have permission to view it".

I am logged in as the system administrator. I can view the contents of the list view if I go that object's tab and select that list view. The code for my sample component is below.

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" access="global">
<lightning:listView aura:id="listViewAccounts"
                    objectApiName="namespace__objectname__c"
                    listName="All"
                    rows="5"
                    showActionBar="true"
                    enableInlineEdit="true"
                    showRowLevelActions="true"
                    /></aura:component>

The error message that I am seeing enter image description here

Let me know if you can spot what I am doing wrong. Your response will be greatly appreciated.

1
  • I am using the developer name for "listname" attribute of the component. I have verified it by running the query "select name, developername, sobjecttype from listview". I have also verified that the listview is part of the managed package. May 13, 2018 at 16:05

1 Answer 1

2

The lightning:listViewdocumentation says that listName is "The developer name of the List View" so something to try to access a list view that is in the managed package would be to add the managed package's namespace prefix. Assuming that is "xyz":

listName="xyz__All"

Also are you sure the list view "All" is in the managed package?

3
  • Hi @keith, Yes, I am using the developer name of the list view. I verified it by running the query "select name, developername, sobjecttype from listview". The listview is part of the managed package. May 13, 2018 at 16:03
  • any object or component that is part of a managed package should have the namespace prefix before it's developer name. so @ReddyRachamallu please check really good with which components you are playing May 14, 2018 at 8:16
  • Hi @Itai, Thanks. Adding the namespace prefix to the list view name did the trick. I should have tried it before posting. May 14, 2018 at 17:15

You must log in to answer this question.

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