function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Giridhar MannavaGiridhar Mannava 

Lightning component not redirecting to the updated list views in Salesforce 1 App

Hi,

We are redirecting to the list view after a custom lightning button in clicked on the detail page.However,it is redirecting to the list view..but we are manually pulling it to see the updated list view.How to get the refreshed list view after redirection..?


  action.setCallback(this, function(a) {        
        if (a.getState() === "SUCCESS") {
          /*  $A.get('e.force:refreshView').fire();
            $A.get("e.force:closeQuickAction").fire();*/
            $A.get('e.force:refreshView').fire();
            listviews = a.getReturnValue(); 
            console.log(listviews);
            var navEvent = $A.get("e.force:navigateToList");
            navEvent.setParams({
                "listViewId": listviews[0].Id,
                "listViewName": null,
                "scope": "Competitive_Pricing_Entry__c"
            });
            navEvent.fire();
            
            var toastEvent = $A.get("e.force:showToast");
            toastEvent.setParams({
                "title": "Success!",
                "message": "The record has been updated successfully."
            });
            toastEvent.fire();
            
            $A.get('e.force:refreshView').fire();
            //console.log('success');