0

I have a custom lightning page which has two lightning components and 2 visualforce pages. In the lightning components whenever any changes being done I have used the force:refreshview event getting fired so that the new value can be seen on the screen. Even though the refreshview event fired but I don't see the VF getting loaded again with the new values. It still contain the old one which was there at the time of loading the page.

Any idea why ? is their any way to refresh the entire lightning page (though it will be slow) but I open to other ideas if any?

4
  • You can try window.location.reload Jun 17, 2018 at 20:16
  • VF pages are inside lightning component? Or components inside another vf page (lightning.out)?
    – patryk
    Jun 17, 2018 at 20:31
  • VF pages are not inside lightning component. its a standalone VF page in the lightning page.
    – Abhik Dey
    Jun 18, 2018 at 5:34
  • @AvijitChakraborty: I had tried location reload, parent.location.reload. window.location.href, it didn worked
    – Abhik Dey
    Jun 18, 2018 at 5:35

1 Answer 1

2

I had the same issue and the easiest way to achieve this is instead of refreshing the view just simply redirecting to the same page. My helper method:

    gotoURL : function (component, event, helper, url, isRedirect) {
    var urlEvent = $A.get("e.force:navigateToURL");
    urlEvent.setParams({
      "url": url,
      "isredirect": isRedirect
    });
    urlEvent.fire();
},

Unlike refreshView this will refresh VF inside. With new URL format you can just pass it like /mypage

1
  • I will try this
    – Abhik Dey
    Jun 22, 2018 at 13:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .