Displaying User Messages

Some Server Events are designed to display messages to the user based on a return value. For the other server events a user message can be displayed by throwing the following exception method.

WrUserMessage(string messageOrId, wrUserMessageType Type)


Displays a message to the user. 


wrUserMessageType can either be Text or Id.
 Text – The user message will display the string message
 Id – The user message will display the string associated with the Id in the Language Files.

This requires a reference to WebReports.Api.Common



//OnWebServiceExecuteEnd, inspect the returned value and throw a
//message if it matches any of the error messages. object webServiceResult = args[0]; switch(webServiceResult.ToString()) {     case "message1" : throw new WrUserMessage("Some Message to User", WrUserMessageType.Text); } return webServiceResult;
Note: This cannot be used for the Events OnConfigLoadStartOnConfigLoadEnd or OnExceptionThrown.

Hidden Article Information

Article Author
Exago Development
created 2017-02-21 15:48:26 UTC
updated 2018-01-29 21:58:42 UTC

Server Events, error, error details,
Have more questions? Submit a request