I have a report where, once the user clicks a SAVE button it fires a script. Can I do a dialog box where once the user clicks SAVE, A dialog with "Confirm save ... Yes? No? " pops up and when the user clicks Yes it fires the script? I would like this to work on both the web player and desktop
You can use the following iron python script for solving this:
import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import MessageBox, MessageBoxButtons
from System.Windows.Forms import DialogResult
dialogResult = MessageBox.Show("Some question", "Some Title", MessageBoxButtons.YesNo)
if(dialogResult == DialogResult.Yes):
MessageBox.Show("The answer is YES")
else:
MessageBox.Show("The answer is NO")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With