Activity Forums Salesforce® Discussions How to refresh a Lightning Component after Success in Salesforce?

  • Deepak

    Member
    April 9, 2020 at 5:20 pm

    Reloads the view.
    To refresh a view, run $A.get('e.force:refreshView').fire();, which reloads all data for the view.
    This example refreshes the view after an action is successfully completed.
    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);
    }

  • Shubham

    Member
    April 9, 2020 at 5:33 pm

    Hi Krati,
    To refresh a view, run $A.get('e.force:refreshView').fire();,

  • Ratnesh

    Member
    April 11, 2020 at 2:32 pm

    Navigate to Setup | Customize | Contacts | Fields.
    Look for the picklist and click it.
    Click Edit link for the field need to be set as default.
    Select "Make this value the default for the master picklist", if any other value selected as default prior, it will be auto deselect.
    Click Save button.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos