1 个回答
HI Ravi,In your flow, consider adding an additional screen or element that redirects users to a different URL or page after the flow completes successfully. This way, if users go back, they won't re-trigger the flow.Also, I've come across a similar ask on https://salesforce.stackexchange.com/questions/355325/browser-back-button-keep-re-executing-the-lightning-flow that might help you: Because clicking the action changes the url, you have to mess with the browser history. In the lwc that's executed by the action, replace the browser's history of the current page with the previous page.
const ref = document.referrer;
if (ref) {
window.history.replaceState(null, null, ref);
}
Then when you press back, it will effectively go to the page you were on prior to the action.
Related:https://salesforce-flowsome.com/how-to-redirect-users-returl/Thanks