Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.5

API: Message.AddReferenceToMainMessage

Scoped Name

APIServer.Messages.AddReferenceToMainMessage

Interface

Field Variable ...as Description
MessageID Message Input The unique identification of the message that must refer to another message
MessageID RefersTo Input The unique identification of the message that is referred.

Description

This API makes it possible to specify that a message is a sub message of another message.

For example a validation function might write a "Validation failed" message to the log. In most cases a number of things might cause this validation failure - and it is usually desirable to be informed about all the errors that has lead to the validation failure. By creating each of the "explanatory" messages, and then use this API to make them refer to the original error, you can specify that there is a relation between the main validation failed message and the explanatory sub messages.

In the message log (default view), the main message will be shown in the grid view, while the sub messages will be available if the user selects to see details about the main message.

Events

Universal events

ReferencedMessageNotFound

MessageDoesNotExist