Activity Forums Salesforce® Discussions How to refresh component after button click for viewing updated values after refreshing page in Salesforce Lightning?

  • Piyush

    Member
    August 6, 2019 at 11:51 am

    For the  refresh  view, run  $A.get('e.force:refreshView').fire();, which will reload all data for the view.

    Example:-

    refresh : function(component, event, helper) {

    var action = component.get('c.myController');

    action.setCallback(component,

    function(response) {

    var state = response.getState();

    if (state === 'SUCCESS'){

    $A.get('e.force:refreshView').fire();

    } else {

    //do something

    }

    });

    $A.enqueueAction(action);

    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos