+ Start a Discussion

Insufficient access

I am trying to view the listview in lightning component. 
I have created a lightning app & lightning componet and added the component to lightning app builder.
There is no error in developer console. But, when i am viewing the component in salesforce app, it throwing "You don't have access to this record. Ask your administrator for help or to request access." My profile is set to System administrator.
It only happens when i use LDS.
Please suggest me some workaround for this. Below is my code.

Lightning App:

<aura:application implements="force:appHostable">
    <ltng:require styles="/resource/SLDS100/styles/salesforce-lightning-design-system.min.css"/>
    <c:Listview_Newmethod1_1 />

Lightning Component:

<aura:component controller="LGTN_AccountController" implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
   <ltng:require styles="/resource/SLDS100/styles/salesforce-lightning-design-system.min.css"/>
   <aura:dependency resource="markup://force:navigateToList" type="EVENT"/>
   <aura:dependency resource="markup://force:navigateToSObject" type="EVENT"/>
     <ui:button label="List View" press="{!c.gotoList}"/>


gotoList : function (component, event, helper) {
    var action = component.get("c.getListViews");
    action.setCallback(this, function(response){
        var state = response.getState();
        if (state === "SUCCESS") {
            var listviews = response.getReturnValue();
            var navEvent = $A.get("e.force:navigateToList");
                "listViewId": listviews.Id,
                "listViewName": null,
                "scope": "Request__C"


public with sharing class LGTN_AccountController {

   public static ListView getListViews(){
       return [SELECT Id, Name FROM ListView WHERE SobjectType = 'Request__C' LIMIT 1].get(0);
Sitanshu TripathiSitanshu Tripathi
Please once use this code on your component and then try to test, maybe it work for you.
<aura:component controller="LGTN_AccountController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global">

No luck :( :(