(NOT SURE, BUT THIS ISSUE MIGHT BE A SALESFORCE BUG OR AT LEAST AN INCONSISTENCY)
I have defined an Action of type "Custom Visualforce" like this
The button for this Action is "◈ Clone" (top right corner)
When I'm done, I just close the popup via cancel or via the X-bottom on top.
ALL WORKS FINE WITH NO ISSUES AT ALL
The problem starts after the popup is closed when I go on working in Lightning Experience. Then there is an unwanted entry in the browser history. Now when I just navigate back, I do not go to the place I would expect but the popup opens again and the Visualforce Action gets re-executed. This is absolutely not OK.
How can this be prevented? I need the Back-Button just to ignore the popup.
history.replaceState(null, "---", '/');
But I can't get rid of the history
This issue might not appear in Console Apps as Kris Goncalves stated. I did not verify it. If this is true, I think this is an Salesforce BUG in non-Console Apps
Untested idea of a workaround:
- Use Aura Component instead of VF Page as Action Type
- Write a wrapper Aura Component
- Use an IFRAME to host the VF-Page
- maybe the history is not polluted by the VF-Page
- OR the Aura Component can clean the history (which the VF-Page can not do itself)
- testing required