Hi,
My workflow is:
- Press button "SAVE"
- Validation
- If pass then a submit processing
- A question "Do you want to send a mail?"
- If OK - to send mail.
My problem is that Confirm Message is javascript.
Where's a point of that in submit processing?
Thanks
❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Vinish Kapoor
Follow these steps:
Create a new page as modal dialog and print the text on it "Do you want to send a mail?".
Then create two buttons on this modal dialog page, for example, yes and no buttons.
Now on that page from which you want to ask the question. Create a branch after processing and open the dialog page you just created.
And on the dialog page, you can write the code for sending the mail for the Yes button.
Use this approach, it would work perfectly.
Yuri
Thank you Vinish, for your fast answer.
After I sended the question I've solved this problem in an another way.
I didn't want to create a new page. I've created a new brunch in the After Process section with Redirect to URL javascript:isSendMail();
In the function javascript:
function isSendMail(){
apex.message.confirm('Do you vant to send Mail?' ,
function( okPressed ) {
if( okPressed )
{
apex.server.process("Send_Mail"
,{x01 : $v('P80_SEQ')}
,{dataType : 'text'
,success : function(pData){
console.log('Success: '+pData);
// apex.navigation.dialog.close(true);
}
});
} else{
// apex.navigation.dialog.close(true);
}
});
}else {
// apex.navigation.dialog.close(true);
}
}
This works too.
Regards