[SalesForce] Lightning – Refresh Component on Submit

I have built a lightning app containing 2 components.

1)Comp1 is the login page. Comp2 is the registration page.
2) After logging in user is taken to the registration page. User enters data here that goes into salesforce.

I want to –

1) To Show the progress while the record is being saved.
2) Refresh the page once data is saved.

I tried using $A.get("e.force:refreshView") but I am getting error as this event is being returned as null. Am I missing something?

Best Answer

Events like $A.get("e.force:refreshView") are only available in the context of Salesforce1 application. If you are not running inside SF1 then you have to use standard javascript means, like window.location.reload() or window.location.href = ...

Related Topic