Reputation: 1311
What' the quickest way to display a message similar to MsgBox in C# ? I've tried this:
Base.Document.View.Ask("Hello World", MessageButtons.OK);
It publishes but I'm getting an error when it executes.
Upvotes: 1
Views: 2877
Reputation: 8278
For that use case, throwing an exception will be enough:
throw new PXException("Hello World");
It uses the browser themed message box:
For debugging I prefer using traces:
PXTrace.WriteInformation("Hello World");
Message will appear in the trace window:
You can open the trace window in the help menu from most Acumatica screens:
Upvotes: 5