• Giridhar Mannava
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
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');