You need to sign in to do that
Don't have an account?
DIVYANSHU BHUSHAN
Flow Salesforce
I need to show warning message when user close[X] the flow. It is working fine, but it is also showing warning message when click on the pause button and next button. This should not be happening.
Here is my code :-
Thanks in advance :)
Here is my code :-
<apex:page standardController="Contact" extensions="ContactIntakeFlowController"> <script type="text/javascript"> window.onbeforeunload = function() { return "Did you save your stuff?" } </script> <flow:interview name="ClientIntakeFlow_FROM_CONTACT" allowShowPause="true" finishLocation="{!PageA}" pausedInterviewId="{!pausedId}" rendered="{!displayBoolean}"> <apex:param name="ClientIdVar" value="{!Contact.Id}"/> </flow:interview> </apex:page>
Thanks in advance :)
Let Me Know, If it works don't forget to mark it as a best answer.
--
Regards,
Swayam
@Salesforceguy
<apex:page standardController="Contact" extensions="ContactIntakeFlowController">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"/>
<script type="text/javascript">
$(function () {
$(".FlowPauseBtn").click(function {
window.onbeforeunload = null;
});
$(".FlowNextBtn").click(function {
window.onbeforeunload = null;
});
});
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "Did you save your stuff?";
}
</script>
<flow:interview name="ClientIntakeFlow_FROM_CONTACT" allowShowPause="true" finishLocation="{!PageA}" pausedInterviewId="{!pausedId}" rendered="{!displayBoolean}">
<apex:param name="ClientIdVar" value="{!Contact.Id}"/> </flow:interview>
</apex:page>
--
Regards,
Swayam
@salesforceguy