Activity › Forums › Salesforce® Discussions › How to refresh a Lightning Component after Success in Salesforce?
-
How to refresh a Lightning Component after Success in Salesforce?
Posted by krati vishnoi on April 9, 2020 at 4:58 PMHow to refresh a Lightning Component after Success in Salesforce?
Ratnesh replied 6 years, 1 month ago 4 Members · 3 Replies -
3 Replies
-
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);
} - [adinserter block='9']
-
Hi Krati,
To refresh a view, run $A.get(‘e.force:refreshView’).fire();, -
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.