Scroll

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)

Description

Displays a message to the user. 

Remarks

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

Example

 

//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 OnConfigLoadStart or OnConfigLoadEnd.

Hidden Article Information

Article Author
Exago Development
created 2017-02-21 15:48:26 UTC
updated 2017-02-21 16:17:13 UTC

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