I have a button to save some process in my APPayments Form.
In this Form i have a Button to generate an XML and set the Payment as "Generated".
When click the button, the process run and set the values.
But... I need a confirmation message on this button:
Ok: run the process normal
Cancel: this option cancel the process to set the "Generated" value
How can i set a confirmation message?
I code in Visual Basic.
Sorry for my english
The Help documentation from Mongoose is a little vague on this-- however after some fiddling around i got you some info.
Infor Docs for Application.ShowMessage: https://docs.infor.com/mg/10.x/en-us/mongooseolh/default.html?helpcontent=lsm1454148040187.html
The signatures:
'Public Function ShowMessage(Prompt As String, Style As Microsoft.VisualBasic.MsgBoxStyle, Caption As String) As Mongoose.Scripting.wsMsgBoxResult': Option Strict On disallows implicit conversions from 'Microsoft.VisualBasic.MsgBoxStyle' to 'String'.'Public Function ShowMessage(Prompt As String, Buttons As Mongoose.Scripting.wsMessageStyle, Icon As Mongoose.Scripting.wsMessageStyle) As Mongoose.Scripting.wsMsgBoxResult': Option Strict On disallows implicit conversions from 'Microsoft.VisualBasic.MsgBoxStyle' to 'Mongoose.Scripting.wsMessageStyle'.
So to accomplish what you're wanting to do you could simply use the second one. This one allows the use of an Icon on the messagebox whereas the first one does not.
Public Function ShowMessage(Prompt As String, Buttons As Mongoose.Scripting.wsMessageStyle, Icon As Mongoose.Scripting.wsMessageStyle) As Mongoose.Scripting.wsMsgBoxResult
An example for this particular signature would be:
If Application.ShowMessage("Do you want to continue", Mongoose.Scripting.wsMessageStyle.wsOKCancel, Mongoose.Scripting.wsMessageStyle.wsQuestion) = Mongoose.Scripting.wsMsgBoxResult.wsOK Then Application.ShowMessage("You clicked OK") Else Application.ShowMessage("You clicked cancel") End If
Let me know how this works for you.