I have a lightning button (Generate Output) on a SF community page where it called a VF page and performed a DML operation. But when I return back to the page, the status of Approval Stage=Generated does not shows up until and unless I refresh the page. While looking into Cache setup of the Org under Session setting, it is found that the check box for "Enable Secure and Persistence Browser Caching to improved Performance" is checked. If I unchecked it, new status shows "Generated" without page refresh. For example --

Initial Approval Stage = Approved --> before hitting the lightning button and Approval Stage = Generated --> the expected result after clicking the lightning button " Generate Output" .

The function we use for inside VF page is : function goBack() { var s = '{!JSENCODE($Site.BaseUrl)}'; s += '/{!Apttus_Proposal__Proposal__c.Id}'; window.top.document.location.href = s; }

We are looking to make this functionality without disabling the "Enable Secure and Persistent Browser Caching to Improved Performance" . enter image description here

  • This looks to me like a manifestation of this Known Issue. Unfortunately, the workarounds suggested there would probably require you to do some refactoring, like building a Lightning Component instead of a Visualforce-backed button. – David Reed Nov 24 '18 at 19:26

I can't guarantee this works for Communities as well but...

In Lightning Experience I've found that executing the reload record function on force:recordData forces the Lightning cache of that record to update. Perhaps if there were a way to force that before navigating back? Or if you implement this functionality with a Lightning component instead, then it's easier to force that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.